Re: Issue 317 in xmonad: Implement a working X.U.putSelection

Updates: Summary: Implement a working X.U.putSelection Comment #13 on issue 317 by daniel.schoepe: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 putSelection has been removed for now until we have a clean way to do this. For now, someone who wants to use this feature can define a function that uses xclip/xsel to set the selection and use that function in his prompt keymap. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Updates: Labels: Type-Enhancement Priority-Low Component-Contrib Comment #14 on issue 317 by daniel.schoepe: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 (No comment was entered for this change.) -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #15 on issue 317 by ale...@feldgendler.ru: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 The clean way to do this would probably be for XMonad to have a hidden window and handle its selection events in the main loop. However, this won't fix the situation when the text is pasted into a prompt because the prompt runs its own event loop. To fix this, various nested event loops such as the one in Prompt (are there more?) should somehow invoke the global event handler as well. This will also fix the issue where XMonad doesn't notice new client windows while a prompt is active. I'm fine with using xclip for now. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #16 on issue 317 by alexey@feldgendler.ru: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 Wait, no, I'm not fine with using xclip for now. Invoking xclip from an editing action hangs prompt just as well. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #17 on issue 317 by alexey@feldgendler.ru: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 Disregard my last comment. That was for an unrelated reason. Finally got it working. However, there is currently no way to get the current string out of the XP monad. Can you please add this to Prompt.hs (exporting, of course)? -- | Return the currently entered string getString :: XP (String) getString = gets command -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #18 on issue 317 by daniel.schoepe: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 This works for me(you need to darcs pull again since I noticed X.Prompt lacked set/getInput): putSelection str = spawn $ "echo \"" ++ concatMap escape str ++ "\" | xclip" where escape x | x `elem` "$;&|\"'\\" = "\\" ++ [x] | otherwise = [x] .. promptKeymap = M.fromList [((controlMask,xK_c), getInput >>= liftIO . putSelection)] `M.union` promptKeymap defaultXPConfig -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #19 on issue 317 by alexey@feldgendler.ru: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 I rather did it with runInteractiveProcess and avoided escaping, but the idea is the same. So you call getInput what I called getString. OK, fine. Thanks for your effort! -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings

Comment #20 on issue 317 by h2oz7v: Implement a working X.U.putSelection http://code.google.com/p/xmonad/issues/detail?id=317 Was about to re-report this bug. This still exists in v0.9 -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings
participants (1)
-
codesite-noreply@google.com