aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions/WindowNavigation.hs
diff options
context:
space:
mode:
authorDevin Mullins <me@twifkak.com>2008-05-25 07:02:31 +0200
committerDevin Mullins <me@twifkak.com>2008-05-25 07:02:31 +0200
commit59aa24736c4eb893d80a51ef29aa9de986249608 (patch)
treea64c470d1aa0ab575b221fbc829a593a9740a557 /XMonad/Actions/WindowNavigation.hs
parenteee99f38c73b75eed4b4fac283c75261800ae977 (diff)
downloadXMonadContrib-59aa24736c4eb893d80a51ef29aa9de986249608.tar.gz
XMonadContrib-59aa24736c4eb893d80a51ef29aa9de986249608.tar.xz
XMonadContrib-59aa24736c4eb893d80a51ef29aa9de986249608.zip
more documentation for WindowNavigation and UrgencyHook
darcs-hash:20080525050231-78224-669c83df86a8b585883d0fb3ef054e37670261e8.gz
Diffstat (limited to 'XMonad/Actions/WindowNavigation.hs')
-rw-r--r--XMonad/Actions/WindowNavigation.hs43
1 files changed, 35 insertions, 8 deletions
diff --git a/XMonad/Actions/WindowNavigation.hs b/XMonad/Actions/WindowNavigation.hs
index 3d636ba..2bf605c 100644
--- a/XMonad/Actions/WindowNavigation.hs
+++ b/XMonad/Actions/WindowNavigation.hs
@@ -1,17 +1,27 @@
-----------------------------------------------------------------------------
-- |
--- Module : XMonad.Layout.WindowNavigation
+-- Module : XMonad.Actions.WindowNavigation
-- Copyright : (c) 2007 David Roundy <droundy@darcs.net>,
-- Devin Mullins <me@twifkak.com>
-- Maintainer : Devin Mullins <me@twifkak.com>
-- License : BSD3-style (see LICENSE)
--
--- This is a rewrite of "XMonad.Layout.WindowNavigation", for the purposes of
--- code cleanup and Xinerama support. It's not complete, so you'll want to
--- use that one for now.
+-- This is a rewrite of "XMonad.Layout.WindowNavigation". WindowNavigation
+-- lets you assign keys to move up\/down\/left\/right, based on actual cartesian
+-- window coordinates, rather than just going j\/k on the stack.
--
--- WindowNavigation lets you assign keys to move up/down/left/right, based on
--- actual cartesian window coordinates, rather than just going j/k on the stack.
+-- This module differs from the other in a few ways:
+--
+-- (1) You can go up\/down\/left\/right across multiple screens.
+--
+-- (2) It doesn't provide little border colors for your neighboring windows.
+--
+-- (3) It doesn't provide the \'Move\' action, which seems to be related to
+-- the XMonad.Layout.Combo extension.
+--
+-- (4) It tries to be slightly smarter about tracking your current position.
+--
+-- (5) Configuration is different.
--
-----------------------------------------------------------------------------
@@ -42,12 +52,29 @@ import Graphics.X11.Xlib
-- $usage
--
--- Don't use it! What, are you crazy?
+-- To use it, you're going to apply the 'withWindowNavigation' function.
+-- 'withWindowNavigation' performs some IO operations, so the syntax you'll use
+-- is the same as the spawnPipe example in "XMonad.Hooks.DynamicLog".
+-- In particular:
+--
+-- > main = do
+-- > config <- withWindowNavigation (xK_w, xK_a, xK_s, xK_d)
+-- > $ defaultConfig { ... }
+-- > xmonad config
+--
+-- Here, we pass in the keys for navigation in counter-clockwise order from up.
+-- It creates keybindings for @modMask@ to move to window, and @modMask .|. shiftMask@
+-- to swap windows.
+--
+-- If you want more flexibility over your keybindings, you can use
+-- 'withWindowNavigationKeys', which takes a list of @keys@-esque entries rather
+-- than a tuple of the four directional keys. See the source code of
+-- 'withWindowNavigation' for an example.
-- TODO:
--- - documentation :)
-- - monad for WNState?
-- - cleanup (including inr)
+-- - more documentation
-- - tests? (esp. for edge cases in currentPosition)
-- - solve the 2+3, middle right to bottom left problem
-- - manageHook to draw window decos?