diff options
author | gwern0 <gwern0@gmail.com> | 2012-01-13 02:04:10 +0100 |
---|---|---|
committer | gwern0 <gwern0@gmail.com> | 2012-01-13 02:04:10 +0100 |
commit | 91ce6778119f8f4dda02b012737b9da693a04041 (patch) | |
tree | db9b10c61fbca2453c0e50e0a0a5c878ed03895f | |
parent | 2bf98f96781fd823292d8c1c681c206da9c9da27 (diff) | |
download | metatile-91ce6778119f8f4dda02b012737b9da693a04041.tar metatile-91ce6778119f8f4dda02b012737b9da693a04041.zip |
Config.hs: implement mod-shift-/ newbie keybinding guide per http://code.google.com/p/xmonad/issues/detail?id=182
Ignore-this: bdfa33d3d06d7cf67fe689421f30a0ca
darcs-hash:20120113010410-f7719-04f51d6bbe88b291e4e388104c1350a27c203f80
-rw-r--r-- | XMonad/Config.hs | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/XMonad/Config.hs b/XMonad/Config.hs index 6d8bab1..114df2a 100644 --- a/XMonad/Config.hs +++ b/XMonad/Config.hs @@ -200,6 +200,10 @@ keys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ -- quit, or restart , ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) -- %! Quit xmonad , ((modMask , xK_q ), spawn "if type xmonad; then xmonad --recompile && xmonad --restart; else xmessage xmonad not in \\$PATH: \"$PATH\"; fi") -- %! Restart xmonad + + , ((modMask .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) -- %! Run xmessage with a summary of the default keybindings (useful for beginners) + -- repeat the binding for non-American layout keyboards + , ((modMask , xK_question), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) ] ++ -- mod-[1..9] %! Switch to workspace N @@ -215,7 +219,6 @@ keys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] -- | Mouse bindings: default actions bound to mouse events --- mouseBindings :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ()) mouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList -- mod-button1 %! Set the window to floating mode and move by dragging @@ -229,7 +232,7 @@ mouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList -- you may also bind events to the mouse scroll wheel (button4 and button5) ] --- | And, finally, the default set of configuration values itself +-- | The default set of configuration values itself defaultConfig = XConfig { XMonad.borderWidth = borderWidth , XMonad.workspaces = workspaces @@ -246,3 +249,54 @@ defaultConfig = XConfig , XMonad.handleEventHook = handleEventHook , XMonad.focusFollowsMouse = focusFollowsMouse } + +-- | Finally, a copy of the default bindings in simple textual tabular format. +help :: String +help = unlines ["The default modifier key is 'alt'. Default keybindings:", + "", + "-- launching and killing programs", + "mod-Shift-Enter Launch xterminal", + "mod-p Launch dmenu", + "mod-Shift-p Launch gmrun", + "mod-Shift-c Close/kill 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 Resize/refresh viewed windows to the correct size", + "", + "-- move focus up or down the window stack", + "mod-Tab Move focus to the next window", + "mod-Shift-Tab Move focus to the previous window", + "mod-j Move focus to the next window", + "mod-k Move focus to the previous window", + "mod-m Move focus to the master window", + "", + "-- modifying the window order", + "mod-Return Swap the focused window and the master window", + "mod-Shift-j Swap the focused window with the next window", + "mod-Shift-k Swap the focused window with the previous window", + "", + "-- resizing the master/slave ratio", + "mod-h Shrink the master area", + "mod-l Expand the master area", + "", + "-- floating layer support", + "mod-t Push window back into tiling; unfloat and re-tile it", + "", + "-- increase or decrease number of windows in the master area", + "mod-comma (mod-,) Increment the number of windows in the master area", + "mod-period (mod-.) Deincrement the number of windows in the master area", + "", + "-- quit, or restart", + "mod-Shift-q Quit xmonad", + "mod-q Restart xmonad", + "mod-[1..9] Switch to workSpace N", + "", + "-- Workspaces & screens", + "mod-Shift-[1..9] Move client to workspace N", + "mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", + "mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", + "", + "-- Mouse bindings: default actions bound to mouse events", + "mod-button1 Set the window to floating mode and move by dragging", + "mod-button2 Raise the window to the top of the stack", + "mod-button3 Set the window to floating mode and resize by dragging"]
\ No newline at end of file |