Created
March 7, 2012 14:56
-
-
Save ArthurClune/1993633 to your computer and use it in GitHub Desktop.
xmonad.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeysP) | |
import qualified XMonad.StackSet as W | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Layout.NoBorders | |
import XMonad.Layout.Spiral | |
import System.IO | |
import XMonad.Hooks.EwmhDesktops | |
-- myManageHook = composeOne [ | |
-- isFullscreen -?> doFullFloat | |
-- ] | |
myManageHook = composeAll [ | |
isFullscreen --> (doF W.focusDown <+> doFullFloat) | |
] | |
myLayout = avoidStruts ( Mirror tiled ||| tiled ||| | |
Full ||| spiral(6/7) ) | |
where | |
tiled = Tall nmaster delta ratio | |
nmaster = 1 | |
ratio = 2/3 | |
delta = 3/100 | |
myWorkspaces = ["1","2","3","4","5","6","7","8","9"] | |
main = do | |
xmproc <- spawnPipe "xmobar" | |
xmonad $ defaultConfig | |
{ manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above | |
<+> manageHook defaultConfig | |
, layoutHook = smartBorders $ myLayout | |
, terminal = "gnome-terminal" | |
, logHook = dynamicLogWithPP $ xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "red" "" . shorten 60 | |
} | |
-- , modMask = mod4Mask -- Rebind Mod to the Windows key | |
, handleEventHook = fullscreenEventHook | |
} `additionalKeysP` | |
([ | |
("M-=", spawn "gnome-screensaver-command -l"), | |
("M-p", spawn "exe=`dmenu_path | /home/arthur/.cabal/bin/yeganesh` && eval \"exec $exe\""), | |
("M-o", spawn "host=`list_ssh_hosts | /home/arthur/.cabal/bin/yeganesh -p hosts -f` && eval \"exec gnome-terminal --command=\\\"/usr/bin/ssh $host\\\"\"") | |
] ++ | |
[ | |
(otherModMasks ++ "M-" ++ [key], action tag) | |
| (tag, key) <- zip myWorkspaces "123456789" | |
, (otherModMasks, action) <- [ ("", windows . W.view) -- was W.greedyView | |
, ("S-", windows . W.shift)] | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment