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