From b3c249434d7482eb9dee236b150f7a8fba0380ce Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Tue, 27 Aug 2024 08:21:54 +0200 Subject: [PATCH] X.H.StatusBar: Make barSpawner pure Related: https://github.com/xmonad/xmonad-contrib/pull/878 Related: https://github.com/xmonad/xmonad-contrib/issues/880 --- XMonad/Hooks/StatusBar.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XMonad/Hooks/StatusBar.hs b/XMonad/Hooks/StatusBar.hs index ac419cce1..3165cf80d 100644 --- a/XMonad/Hooks/StatusBar.hs +++ b/XMonad/Hooks/StatusBar.hs @@ -426,12 +426,12 @@ statusBarPipe cmd xpp = do -- > xmobarBottom = statusBarPropTo "_XMONAD_LOG_2" "xmobar -x 0 ~/.config/xmobar/xmobarrc_bottom" (pure ppBottom) -- > xmobar1 = statusBarPropTo "_XMONAD_LOG_3" "xmobar -x 1 ~/.config/xmobar/xmobarrc1" (pure pp1) -- > --- > barSpawner :: ScreenId -> IO StatusBarConfig --- > barSpawner 0 = pure $ xmobarTop <> xmobarBottom -- two bars on the main screen --- > barSpawner 1 = pure $ xmobar1 +-- > barSpawner :: ScreenId -> StatusBarConfig +-- > barSpawner 0 = xmobarTop <> xmobarBottom -- two bars on the main screen +-- > barSpawner 1 = xmobar1 -- > barSpawner _ = mempty -- nothing on the rest of the screens -- > --- > main = xmonad $ dynamicSBs barSpawner (def { ... }) +-- > main = xmonad $ dynamicSBs (pure . barSpawner) (def { ... }) -- -- Make sure you specify which screen to place the status bar on (in xmobar, -- this is achieved by the @-x@ argument). In addition to making sure that your