xmonad-config/lib/ScreenEvents.hs
2023-06-21 12:21:59 +03:00

20 lines
516 B
Haskell

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 "/home/e/.fehbg" >> return (All True)
screenChangeHandler _ = return (All True)
modify :: XConfig l -> XConfig l
modify conf = conf
{ handleEventHook = mconcat
[ screenChangeHandler
, handleEventHook conf ] }