aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Util/Paste.hs
diff options
context:
space:
mode:
authorgwern0 <gwern0@gmail.com>2008-09-21 17:49:50 +0200
committergwern0 <gwern0@gmail.com>2008-09-21 17:49:50 +0200
commit3b932a6749c8171361ba735bc52a4cf83f5a6245 (patch)
treef9de1afe339a67f94fffb8e6623a8a34d1ab0006 /XMonad/Util/Paste.hs
parent047b5f2e0421e1f4b5fcbc6c3b12ef574e7dd2de (diff)
downloadXMonadContrib-3b932a6749c8171361ba735bc52a4cf83f5a6245.tar.gz
XMonadContrib-3b932a6749c8171361ba735bc52a4cf83f5a6245.tar.xz
XMonadContrib-3b932a6749c8171361ba735bc52a4cf83f5a6245.zip
Paste.hs: shorten comment lines to under 80 columns per sjanssen
darcs-hash:20080921154950-f7719-d24b1961ada404e29051923c1e7cfb4837c8ab63.gz
Diffstat (limited to 'XMonad/Util/Paste.hs')
-rw-r--r--XMonad/Util/Paste.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/XMonad/Util/Paste.hs b/XMonad/Util/Paste.hs
index 2bc4381..2e5fb49 100644
--- a/XMonad/Util/Paste.hs
+++ b/XMonad/Util/Paste.hs
@@ -30,8 +30,8 @@ Import this module into your xmonad.hs as usual:
> import XMonad.Util.XPaste
-And use the functions. They all return "X ()", and so are appropriate for use as keybindings.
-Example:
+And use the functions. They all return "X ()", and so are appropriate
+for use as keybindings. Example:
> , ((m, xK_d), pasteString "foo bar") ]
@@ -39,16 +39,19 @@ Don't expect too much of the functions; they probably don't work on complex
texts.
-}
--- | Paste the current X mouse selection. Note that this uses 'getSelection' from "XMonad.Util.XSelection" and so is heir to its flaws.
+-- | Paste the current X mouse selection. Note that this uses 'getSelection' from
+-- "XMonad.Util.XSelection" and so is heir to its flaws.
pasteSelection :: X ()
pasteSelection = getSelection >>= pasteString
--- | Send a string to the window with current focus. This function correctly handles capitalization.
+-- | Send a string to the window with current focus. This function correctly
+-- handles capitalization.
pasteString :: String -> X ()
pasteString = mapM_ (\x -> if isUpper x then pasteChar shiftMask x else pasteChar 0 x)
{- | Send a character to the current window. This is more low-level.
- Remember that you must handle the case of capitalization appropriately. That is, from the window's perspective:
+ Remember that you must handle the case of capitalization appropriately.
+ That is, from the window's perspective:
> pasteChar mod2Mask 'F' ~> "f"