The main concern of these key bindings is ergonomics, followed by ease of memorization.
Set your modMask to the lower left modifier that you prefer. I use the window key, but any one will do, as long as you can reach the 'qaz' column easily. Most of the command keys will be on the right side of the keyboard, so that you can reach the modifier by moving your left forearm, maintaining a neutral wrist position to minimize the strain, while the right hand rests on the home row.
| Original key | Changed to |
|---|---|
| p | l |
| c | k |
| n | / |
| j | n |
| k | e |
| h | Shift-z |
| l | z |
| t | ' |
| , | a |
| . | Shift-a |
| b | , |
| w | u |
| e | y |
| r | ; |
| Default | Changed to | Action |
|---|---|---|
| mod-shift-return | Launch terminal | |
| mod-p | mod-l | Launch dmenu |
| mod-shift-p | mod-shift-l | Launch gmrun |
| mod-shift-c | mod-shift-k | close the focused window |
| mod-space | Rotate through the available layout algorithms | |
| mod-shift-space | Reset the layouts on the current workspace to default | |
| mod-n | mod-/ | Resize viewed windows to the correct size |
| mod-tab | Move focus to the next window | |
| mod-shift-tab | Move focus to the previous window | |
| mod-j | mod-n | Move focus to the next window |
| mod-k | mod-e | Move focus to the previous window |
| mod-m | Move focus to the master window | |
| mod-return | Swap the focused window and the master window | |
| mod-shift-j | mod-shift-n | Swap the focused window with the next window |
| mod-shift-k | mod-shift-e | Swap the focused window with the previous window |
| mod-h | mod-shift-z | Shrink the master area |
| mod-l | mod-z | Expand the master area |
| mod-t | mod-' | Push window back into tiling |
| mod-comma | mod-a | Increment the number of windows in the master area |
| mod-period | mod-shift-a | Deincrement the number of windows in the master area |
| mod-b | mod-, | Toggle the status bar gap |
| mod-shift-q | Quit xmonad | |
| mod-q | Restart xmonad | |
| mod-[1..9] | Switch to workspace N | |
| mod-shift-[1..9] | Move client to workspace N | |
| mod-{w,e,r} | mod-{u,y,;} | Switch to physical/Xinerama screens 1, 2, or 3 |
| mod-shift-{w,e,r} | mod-shift-{u,y,;} | Move client to screen 1, 2, or 3 |
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
-- launch a terminal
[ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- launch dmenu
, ((modMask, xK_l ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
-- launch gmrun
, ((modMask .|. shiftMask, xK_l ), spawn "gmrun")
-- close focused window
, ((modMask .|. shiftMask, xK_k ), kill)
-- Rotate through the available layout algorithms
, ((modMask, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modMask, xK_slash ), refresh)
-- Move focus to the next window
, ((modMask, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modMask, xK_n ), windows W.focusDown)
-- Move focus to the previous window
, ((modMask, xK_e ), windows W.focusUp )
-- Move focus to the master window
, ((modMask, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modMask, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modMask .|. shiftMask, xK_n ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modMask .|. shiftMask, xK_e ), windows W.swapUp )
-- Shrink the master area
, ((modMask .|. shiftMask, xK_z ), sendMessage Shrink)
-- Expand the master area
, ((modMask, xK_z ), sendMessage Expand)
-- Push window back into tiling
, ((modMask, xK_period), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modMask , xK_a ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modMask .|. shiftMask, xK_a ), sendMessage (IncMasterN (-1)))
-- toggle the status bar gap
-- TODO, update this binding with avoidStruts
----, ((modMask , xK_apostrophe )),
-- Quit xmonad
, ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modMask , xK_q ), restart "xmonad" True)
]
++
xmonad.hs (12K)
(?) for xmonad >= 0.5
Date: 2009-01-01 17:27:32 WET
HTML generated by org-mode 6.06b in emacs 23