You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.4 KiB
Haskell

import XMonad
import System.Exit
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run (spawnPipe) -- for spawnPipe and hPutStrLn
import qualified System.IO
import XMonad.Util.EZConfig (additionalKeysP)
import XMonad.Util.Loggers
lightBlue = "#aabbff"
darkBlue = "#0000cc"
lightGray = "#aaaaaa"
darkGray = "#444444"
dzenBackground = "#000000"
myModMask = mod4Mask -- command
myManageHook = composeAll
[ resource =? "visimeet" --> doFloat
, resource =? "feh" --> doFloat
]
--myWorkspaces = [ "1" , "2" , "3" , "4" , "5", "6", "7", "8", "9" ]
myWorkspaces = [ "α" , "β" , "γ" , "δ" , "ε", "ζ", "η", "θ", "ι" ]
myNormalBorderColor = "#333333"
myFocusedBorderColor = darkBlue
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = False
myStatusBar = "conky -c /home/dustinswan/.conky | dzen2 -x '640' -w '640' -ta 'r' -y '0' -bg '#000000'"
myLogHook h = dynamicLogWithPP $ defaultPP
{ ppCurrent = ("·" ++)
, ppVisible = ("." ++)
, ppHidden = dzenColor lightGray dzenBackground . (" " ++)
, ppHiddenNoWindows = dzenColor darkGray dzenBackground . (" " ++)
, ppLayout = (\_ -> "") -- TODO I suck at haskell
, ppOutput = System.IO.hPutStrLn h
, ppTitle = shorten 20
, ppSep = " | "
, ppWsSep = ""
--, ppExtras = [ date "%a %d %b" ]
}
main = do
dzenLeftBar <- spawnPipe "dzen2 -w '640' -ta 'l'"
spawn myStatusBar
xmonad $ defaultConfig
{ terminal = "urxvtc"
, focusFollowsMouse = myFocusFollowsMouse
, modMask = myModMask
, workspaces = myWorkspaces
, normalBorderColor = myNormalBorderColor
, focusedBorderColor = myFocusedBorderColor
-- hooks
, layoutHook = avoidStruts $ layoutHook defaultConfig
, manageHook = myManageHook
, logHook = myLogHook dzenLeftBar
}
`additionalKeysP`
[ ("M-p", spawn "dmenu_run -fn 'Monospace:pixelsize=11:antialias=false'")
, ("M-S-p", spawn "scrot")
, ("<XF86AudioRaiseVolume>", spawn "amixer sset Master 3%+")
, ("<XF86AudioLowerVolume>", spawn "amixer sset Master 3%-")
, ("<XF86AudioMute>", spawn "amixer sset Master toggle")
]