diff options
author | Alan Pearce | 2014-08-17 16:16:53 +0100 |
---|---|---|
committer | Alan Pearce | 2014-08-17 16:16:53 +0100 |
commit | 9ddcdea56a49c1933ba7194c0aa87eb3589cf7ff (patch) | |
tree | 8d0c7bf8997d704d4be1ea5f095930c7399e8ff8 /tag-xmonad | |
parent | 5f8b835a1bb7793431a525e213fc7c482f59a791 (diff) | |
download | nixfiles-9ddcdea56a49c1933ba7194c0aa87eb3589cf7ff.tar.lz nixfiles-9ddcdea56a49c1933ba7194c0aa87eb3589cf7ff.tar.zst nixfiles-9ddcdea56a49c1933ba7194c0aa87eb3589cf7ff.zip |
XMonad: Reformat and refactor
Follow comma-first style. Extract manage hook
Diffstat (limited to 'tag-xmonad')
-rw-r--r-- | tag-xmonad/xmonad/xmonad.hs | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/tag-xmonad/xmonad/xmonad.hs b/tag-xmonad/xmonad/xmonad.hs index 4b67cb48..9e1fa77f 100644 --- a/tag-xmonad/xmonad/xmonad.hs +++ b/tag-xmonad/xmonad/xmonad.hs @@ -4,31 +4,35 @@ import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers import XMonad.Layout.NoBorders +import XMonad.Util.EZConfig import XMonad.Util.Run(spawnPipe) import System.IO import Data.List(isPrefixOf) +myManageHook :: ManageHook +myManageHook = composeOne + [ className =? "Firefox" -?> doShift "2" + , className =? "Pidgin" -?> doShift "3" + , className =? "nuvolaplayer" -?> doShift "8" + , className =? "Transmission-gtk" -?> doShift "9" + , isFullscreen -?> doFullFloat + , fmap ("mpv" `isPrefixOf`) title -?> doFullFloat + ] + main :: IO () main = do xmproc <-spawnPipe "/usr/bin/xmobar /home/alan/.xmobarrc" - xmonad $ defaultConfig { - manageHook = composeOne [ - className =? "Firefox" -?> doShift "2", - className =? "Pidgin" -?> doShift "3", - className =? "nuvolaplayer" -?> doShift "8", - className =? "Transmission-gtk" -?> doShift "9", - isFullscreen -?> doFullFloat, - fmap ("mpv" `isPrefixOf`) title -?> doFullFloat - ] <+> manageDocks <+> manageHook defaultConfig, - layoutHook = smartBorders . avoidStruts $ layoutHook defaultConfig, - logHook = dynamicLogWithPP xmobarPP { - ppOutput = hPutStrLn xmproc, - ppTitle = xmobarColor "#859900" "" . shorten 200, - ppCurrent = xmobarColor "#b58900" "". wrap "[" "]", - ppHiddenNoWindows = xmobarColor "#93a1a1" "", - ppUrgent = xmobarColor "#dc322f" "#b58900" - }, - terminal = "urxvt", - modMask = mod4Mask, - handleEventHook = fullscreenEventHook + xmonad $ defaultConfig + { manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig + , layoutHook = smartBorders . avoidStruts $ layoutHook defaultConfig + , logHook = dynamicLogWithPP xmobarPP + { ppOutput = hPutStrLn xmproc + , ppTitle = xmobarColor "#859900" "" . shorten 200 + , ppCurrent = xmobarColor "#b58900" "". wrap "[" "]" + , ppHiddenNoWindows = xmobarColor "#93a1a1" "" + , ppUrgent = xmobarColor "#dc322f" "#b58900" + } + , terminal = "urxvt" + , modMask = mod4Mask + , handleEventHook = fullscreenEventHook } |