Ergonomic keybindings for the xmonad window manager on the Colemak keyboard layout

Table of Contents

1 Introduction

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.

2 Layout diagram

2.1 Download

3 Changed keys

Original keyChanged to
pl
ck
n/
jn
ke
hShift-z
lz
t'
,a
.Shift-a
b,
wu
ey
r;

4 Detailed list of key bindings

DefaultChanged toAction
mod-shift-returnLaunch terminal
mod-pmod-lLaunch dmenu
mod-shift-pmod-shift-lLaunch gmrun
mod-shift-cmod-shift-kclose the focused window
mod-spaceRotate through the available layout algorithms
mod-shift-spaceReset the layouts on the current workspace to default
mod-nmod-/Resize viewed windows to the correct size
mod-tabMove focus to the next window
mod-shift-tabMove focus to the previous window
mod-jmod-nMove focus to the next window
mod-kmod-eMove focus to the previous window
mod-mMove focus to the master window
mod-returnSwap the focused window and the master window
mod-shift-jmod-shift-nSwap the focused window with the next window
mod-shift-kmod-shift-eSwap the focused window with the previous window
mod-hmod-shift-zShrink the master area
mod-lmod-zExpand the master area
mod-tmod-'Push window back into tiling
mod-commamod-aIncrement the number of windows in the master area
mod-periodmod-shift-aDeincrement the number of windows in the master area
mod-bmod-,Toggle the status bar gap
mod-shift-qQuit xmonad
mod-qRestart 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

5 The code for the xmonad.hs rc file

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)
    ]
    ++

5.1 Download a complete xmonad.hs

xmonad.hs (12K)
(?) for xmonad >= 0.5


Author: <ruitra@gmail.com>

Date: 2009-01-01 17:27:32 WET

HTML generated by org-mode 6.06b in emacs 23