From 64cedbb27e6e3665d801b39cae964e0a542d8aac Mon Sep 17 00:00:00 2001 From: Martin Potier Date: Fri, 21 Jul 2023 20:15:52 +0300 Subject: [PATCH] Use rescreen --- lib/ScreenEvents.hs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/ScreenEvents.hs b/lib/ScreenEvents.hs index b4aa98e..e218993 100644 --- a/lib/ScreenEvents.hs +++ b/lib/ScreenEvents.hs @@ -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"