Use rescreen

This commit is contained in:
Martin Potier 2023-07-21 20:15:52 +03:00
parent 90d4dbb58e
commit 64cedbb27e
No known key found for this signature in database
GPG key ID: D4DD957DBA4AD89E

View file

@ -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"