-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmonad.hs
34 lines (27 loc) · 1.13 KB
/
xmonad.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import XMonad
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myLayout =Tall 1 (3/100) (1/2) ||| Full
xmobarEscape = concatMap doubleLts
where doubleLts '<' = "<<"
doubleLts x = [x]
myWorkspaces :: [String]
myWorkspaces = clickable . (map xmobarEscape) $ ["1","2","3","4","5"]
where
clickable l = [ "<action=xdotool key super+" ++ show (n) ++ ">" ++ ws ++ "</action>" |
(i,ws) <- zip [1..5] l,
let n = i ]
baseConfig = desktopConfig
main = xmonad =<< xmobar baseConfig
{ terminal = "urxvt"
, modMask = mod4Mask
, handleEventHook = fullscreenEventHook
, workspaces = myWorkspaces
, layoutHook = avoidStruts $ smartBorders $ myLayout
}