diff options
author | gwern0 <gwern0@gmail.com> | 2007-12-16 04:00:15 +0100 |
---|---|---|
committer | gwern0 <gwern0@gmail.com> | 2007-12-16 04:00:15 +0100 |
commit | a7ef518c2b45aa980fef30655661b128c9791dcf (patch) | |
tree | 4886aa6437084008955f04886c89af73d68e1a72 | |
parent | 57f49d6e57adb6f20fe3f461c47dd7be02ff5fb5 (diff) | |
download | XMonadContrib-a7ef518c2b45aa980fef30655661b128c9791dcf.tar.gz XMonadContrib-a7ef518c2b45aa980fef30655661b128c9791dcf.tar.xz XMonadContrib-a7ef518c2b45aa980fef30655661b128c9791dcf.zip |
Warp.hs: +doc
Describe how to emulate Ratpoison's 'banish' functionality on one's config
darcs-hash:20071216030015-f7719-5f44c8fb7f42e30f4e2b0766528ac32d85deb879.gz
-rw-r--r-- | XMonad/Actions/Warp.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/XMonad/Actions/Warp.hs b/XMonad/Actions/Warp.hs index b864f40..075a133 100644 --- a/XMonad/Actions/Warp.hs +++ b/XMonad/Actions/Warp.hs @@ -39,6 +39,16 @@ then add appropriate keybindings to warp the pointer; for example: > | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]] Note that warping to a particular screen may change the focus. + +warpToScreen and warpToWindow can be used in a variety of ways. Suppose you wanted to emulate +Ratpoison's 'banish' command, which moves the mouse pointer to a corner; you could define: +> banish :: X () +> banish = warpToWindow 1 1 -- lower left + +And if you wanted to run it on every window or focus movement, you could put it +into your xmonad.hs's logHook (which activates on every change) like thus: + +> , logHook = banish -} -- For detailed instructions on editing your key bindings, see |