Created
June 18, 2012 08:11
-
-
Save norrs/2947423 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.Hooks.SetWMName | |
import XMonad.Hooks.ICCCMFocus | |
import XMonad.Layout.Fullscreen | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import XMonad.Util.EZConfig(additionalKeysP) | |
import System.IO | |
import System.Exit | |
myManageHook = ( composeAll . concat $ | |
[ [ className =? "Gimp" --> doFloat] | |
, [ className =? "Vncviewer" --> doFloat] | |
, [ className =? "Chromium" --> doShift "2:www"] | |
]) | |
myStartupHook = setWMName "LG3D" -- Fix for java apps, + env _JAVA_AWT_WM_NONREPARENTING=1 | |
myWorkspaces = ["1:main", "2:www", "3:chat", "4:IDE", "5:www-stack", "6:music", "7", "8", "9"] | |
main = do | |
xmproc <- spawnPipe "xmobar" | |
xmonad $ defaultConfig | |
{ terminal = "urxvt" | |
, manageHook = manageDocks <+> myManageHook <+> manageHook defaultConfig | |
, handleEventHook = fullscreenEventHook <+> handleEventHook defaultConfig | |
, startupHook = myStartupHook <+> startupHook defaultConfig | |
, workspaces = myWorkspaces <+> workspaces defaultConfig | |
, layoutHook = avoidStruts $ layoutHook defaultConfig | |
, logHook = takeTopFocus <+> dynamicLogWithPP xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "green" "" . shorten 50 | |
} | |
, modMask = mod4Mask -- Rebind Mod to the Windows key | |
} `additionalKeys` | |
[ ((mod4Mask .|. shiftMask, xK_z), spawn "gnome-screensaver-command -l") | |
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -u") | |
, ((0, xK_Print), spawn "scrot") | |
] `additionalKeysP` | |
[ ("M-S-q", spawn "gnome-session-quit") | |
, ("M-S-backspace", io (exitWith ExitSuccess)) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment