Use rescreen
This commit is contained in:
parent
90d4dbb58e
commit
64cedbb27e
1 changed files with 10 additions and 9 deletions
|
@ -4,17 +4,18 @@ module ScreenEvents (
|
|||
|
||||
import XMonad
|
||||
import Data.Monoid (All(..))
|
||||
import Graphics.X11.Xlib.Extras (Event(RRScreenChangeNotifyEvent))
|
||||
import XMonad.Hooks.Rescreen
|
||||
|
||||
screenChangeHandler :: Event -> X All
|
||||
screenChangeHandler (RRScreenChangeNotifyEvent _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) =
|
||||
spawn "/home/e/.fehbg" >> return (All True)
|
||||
screenChangeHandler _ = return (All True)
|
||||
-- screenChangeHandler :: Event -> X All
|
||||
-- screenChangeHandler (RRScreenChangeNotifyEvent _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = do
|
||||
-- spawn "touch /tmp/xmonad-WAAAAAT"
|
||||
-- spawn "/home/e/.fehbg"
|
||||
-- return (All True)
|
||||
-- screenChangeHandler _ = return (All True)
|
||||
|
||||
modify :: XConfig l -> XConfig l
|
||||
modify conf = conf
|
||||
{ handleEventHook = mconcat
|
||||
[ screenChangeHandler
|
||||
, handleEventHook conf ] }
|
||||
modify = addAfterRescreenHook afterRescreen
|
||||
|
||||
afterRescreen :: X ()
|
||||
afterRescreen = spawn "/home/e/.fehbg"
|
||||
|
||||
|
|
Loading…
Reference in a new issue