blob: b10fba0785ac08ab0a2432948c50caa75be5b428 (
plain)
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
|
module LogHook
( myLogHook
, withStatusBars
) where
import Defaults
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
myLogHook :: X ()
myLogHook = return ()
withStatusBars :: (LayoutClass l Window) => XConfig l -> XConfig l
withStatusBars = dynamicSBs barSpawner
barSpawner :: ScreenId -> IO StatusBarConfig
barSpawner = pure . xmobar
where
pp :: PP
pp =
def
{ ppCurrent = xmobarColor "yellow" "" . wrap "[" "]"
, ppVisible = xmobarColor "white" "" . wrap "[" "]"
, ppUrgent = xmobarColor "red" "" . wrap "[" "]"
, ppOrder = \(ws:_:t:_) -> [ws, t]
}
xmobar :: ScreenId -> StatusBarConfig
xmobar (S screenId) = statusBarProp ("xmobar -x" <> show screenId) $ pure pp
|