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 XMonad
import Data.Monoid (All(..)) import Data.Monoid (All(..))
import Graphics.X11.Xlib.Extras (Event(RRScreenChangeNotifyEvent)) import XMonad.Hooks.Rescreen
screenChangeHandler :: Event -> X All -- screenChangeHandler :: Event -> X All
screenChangeHandler (RRScreenChangeNotifyEvent _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = -- screenChangeHandler (RRScreenChangeNotifyEvent _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = do
spawn "/home/e/.fehbg" >> return (All True) -- spawn "touch /tmp/xmonad-WAAAAAT"
screenChangeHandler _ = return (All True) -- spawn "/home/e/.fehbg"
-- return (All True)
-- screenChangeHandler _ = return (All True)
modify :: XConfig l -> XConfig l modify :: XConfig l -> XConfig l
modify conf = conf modify = addAfterRescreenHook afterRescreen
{ handleEventHook = mconcat
[ screenChangeHandler
, handleEventHook conf ] }
afterRescreen :: X ()
afterRescreen = spawn "/home/e/.fehbg"