xmonad-config/lib/ScreenEvents.hs

21 lines
510 B
Haskell
Raw Normal View History

2020-11-23 15:01:13 +01:00
module ScreenEvents (
ScreenEvents.modify
) where
import XMonad
import Data.Monoid (All(..))
import Graphics.X11.Xlib.Extras (Event(RRScreenChangeNotifyEvent))
screenChangeHandler :: Event -> X All
screenChangeHandler (RRScreenChangeNotifyEvent _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) =
spawn "~/.fehbg" >> return (All True)
screenChangeHandler _ = return (All True)
modify :: XConfig l -> XConfig l
modify conf = conf
{ handleEventHook = mconcat
[ screenChangeHandler
, handleEventHook conf ] }