diff options
-rw-r--r-- | Config.hs | 66 |
1 files changed, 34 insertions, 32 deletions
@@ -1,36 +1,38 @@ module Config where --- xmonad places each window into a "workspace." Each workspace can have any --- number of windows, which you can cycle though with mod-j and mod-k. Windows are --- either displayed full screen, or tiled. You can toggle the layout mode with --- mod-space. --- --- You can switch to workspace N with mod-N. For example, to switch to workspace --- 5, you would press mod-5. Similarly, you can move the current window to another --- workspace with mod-shift-N. --- --- When running with multiple monitors (Xinerama), each screen has exactly 1 --- workspace visible. When xmonad starts, workspace 1 is on screen 1, workspace 2 --- is on screen 2, etc. If you switch to a workspace which is currently visible on --- another screen, xmonad simply switches focus to that screen. If you switch to a --- workspace which is *not* visible, xmonad replaces the workspace on the --- *current* screen with the workspace you selected. --- --- For example, if you have the following configuration: --- --- Screen 1: Workspace 2 --- Screen 2: Workspace 5 (current workspace) --- --- and you wanted to view workspace 7 on screen 1, you would press: --- --- mod-2 (to select workspace 2, and make screen 1 the current screen) --- mod-7 (to select workspace 7) --- --- Since switching to the workspace currently visible on a given screen is such a --- common operation, shortcuts are provided: mod-{w,e,r} switch to the workspace --- currently visible on screens 1, 2, and 3 respectively. Likewise, --- shift-mod-{w,e,r} moves the current window to the workspace on that screen. --- Using these keys, the above example would become mod-w mod-7. +{- +xmonad places each window into a "workspace." Each workspace can have any +number of windows, which you can cycle though with mod-j and mod-k. Windows are +either displayed full screen, or tiled. You can toggle the layout mode with +mod-space. + +You can switch to workspace N with mod-N. For example, to switch to workspace +5, you would press mod-5. Similarly, you can move the current window to another +workspace with mod-shift-N. + +When running with multiple monitors (Xinerama), each screen has exactly 1 +workspace visible. When xmonad starts, workspace 1 is on screen 1, workspace 2 +is on screen 2, etc. If you switch to a workspace which is currently visible on +another screen, xmonad simply switches focus to that screen. If you switch to a +workspace which is *not* visible, xmonad replaces the workspace on the +*current* screen with the workspace you selected. + +For example, if you have the following configuration: + +Screen 1: Workspace 2 +Screen 2: Workspace 5 (current workspace) + +and you wanted to view workspace 7 on screen 1, you would press: + +mod-2 (to select workspace 2, and make screen 1 the current screen) +mod-7 (to select workspace 7) + +Since switching to the workspace currently visible on a given screen is such a +common operation, shortcuts are provided: mod-{w,e,r} switch to the workspace +currently visible on screens 1, 2, and 3 respectively. Likewise, +shift-mod-{w,e,r} moves the current window to the workspace on that screen. +Using these keys, the above example would become mod-w mod-7. +-} import Data.Ratio import Data.Bits @@ -94,7 +96,7 @@ keys = M.fromList $ , (f, m) <- [(view, 0), (tag, shiftMask)]] -- Keybindings to each screen : - -- mod-wer (underneath 123) swtiches to physical/Xinerama screens 1 2 and 3 + -- mod-wer (underneath 123) switches to physical/Xinerama screens 1 2 and 3 ++ [((m .|. modMask, key), screenWS sc >>= f) | (key, sc) <- zip [xK_w, xK_e, xK_r] [1..] |