From 17f297a62ce0ce391fc7ca883bec4c4bb7a676de Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Sat, 24 Nov 2007 03:22:49 +0100 Subject: FocusNth: haddock updates darcs-hash:20071124022249-bd4d7-9ba118dcfe257f1e2f5fc12d34fb068405a789ad.gz --- XMonad/Actions/FocusNth.hs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'XMonad') diff --git a/XMonad/Actions/FocusNth.hs b/XMonad/Actions/FocusNth.hs index 42336ef..b82736d 100644 --- a/XMonad/Actions/FocusNth.hs +++ b/XMonad/Actions/FocusNth.hs @@ -8,7 +8,7 @@ -- Stability : unstable -- Portability : unportable -- --- Focus the nth window on the screen. +-- Focus the nth window of the current workspace. ----------------------------------------------------------------------------- module XMonad.Actions.FocusNth ( @@ -21,18 +21,20 @@ import XMonad.Operations import XMonad -- $usage +-- Add the import to your @~\/.xmonad\/xmonad.hs@: +-- -- > import XMonad.Actions.FocusNth - +-- +-- Then add appropriate keybindings, for example: +-- -- > -- mod4-[1..9] @@ Switch to window N --- > ++ [((mod4Mask, k), focusNth i) +-- > ++ [((modMask x, k), focusNth i) -- > | (i, k) <- zip [0 .. 8] [xK_1 ..]] +-- +-- For detailed instructions on editing your key bindings, see +-- "XMonad.Doc.Extending#Editing_key_bindings". --- %import XMonad.Actions.FocusNth --- %keybdindextra ++ --- %keybdindextra -- mod4-[1..9] @@ Switch to window N --- %keybdindextra [((mod4Mask, k), focusNth i) --- %keybdindextra | (i, k) <- zip [0 .. 8] [xK_1 ..]] - +-- | Give focus to the nth window of the current workspace. focusNth :: Int -> X () focusNth = windows . modify' . focusNth' -- cgit v1.2.3