From 15510395648ff158e69d5cbb1fb06261245880ee Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Sat, 26 May 2007 13:14:53 +0200 Subject: HEADS UP: change key binding for swapLeft/Right and IncMaster The use of arrow keys for swapLeft/Right clash with firefox's back button. Use the more intuitive mod-shift-jk for this. (It's a movement operation, after all). This clashes with IncMaster, so we use mod+comma and mod+period for these (i.e. the keys mod < and mod > , to move windows to and from the master area). While we're here, replace the use of the terms 'left' and 'right' for navigation, in comments and identifiers, with 'up' and 'down' instead. Hence mod-j == focusDown. Far more intuitive for people (dons) who live in fullscreen mode and have vim movement wired into their central nervous system. Principle of least VI surprise: movement down or up means using j and k. darcs-hash:20070526111453-9c5c1-3242145ee5b51eb070a7dc3663f0d6cc01671d5c --- Config.hs | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index f47f35a..7a4a032 100644 --- a/Config.hs +++ b/Config.hs @@ -148,35 +148,40 @@ defaultLayouts = [ full -- keys :: M.Map (KeyMask, KeySym) (X ()) keys = M.fromList $ + -- launching and killing programs [ ((modMask .|. shiftMask, xK_Return), spawn "xterm") , ((modMask, xK_p ), spawn "exe=`dmenu_path | dmenu` && exec $exe") , ((modMask .|. shiftMask, xK_p ), spawn "gmrun") + , ((modMask .|. shiftMask, xK_c ), kill) + + -- rotate through the available layout algorithms , ((modMask, xK_space ), switchLayout) -- 'nudge': resize viewed windows to the correct size. , ((modMask, xK_n ), refresh) - , ((modMask, xK_Tab ), focusRight) - , ((modMask, xK_j ), focusRight) - , ((modMask, xK_k ), focusLeft) + -- move focus up or down the window stack + , ((modMask, xK_Tab ), focusDown) + , ((modMask, xK_j ), focusDown) + , ((modMask, xK_k ), focusUp) - , ((modMask, xK_Left ), swapLeft) - , ((modMask, xK_Right ), swapRight) + -- modifying the window order + , ((modMask, xK_Return), swapMaster) + , ((modMask .|. shiftMask, xK_j ), swapDown) + , ((modMask .|. shiftMask, xK_k ), swapUp) + -- resizing the master/slave ratio , ((modMask, xK_h ), sendMessage Shrink) , ((modMask, xK_l ), sendMessage Expand) - , ((modMask .|. shiftMask, xK_j ), sendMessage (IncMasterN 1)) - , ((modMask .|. shiftMask, xK_k ), sendMessage (IncMasterN (-1))) - - , ((modMask .|. shiftMask, xK_c ), kill) + -- increase or decrease number of windows in the master area + , ((modMask , xK_comma ), sendMessage (IncMasterN 1)) + , ((modMask , xK_period), sendMessage (IncMasterN (-1))) + -- quit, or restart , ((modMask .|. shiftMask, xK_q ), io $ exitWith ExitSuccess) , ((modMask .|. shiftMask .|. controlMask, xK_q ), restart Nothing True) - -- Cycle the current tiling order - , ((modMask, xK_Return), swapMaster) - ] ++ -- Keybindings to get to each workspace: [((m .|. modMask, k), f i) -- cgit v1.2.3