summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar.hs')
-rw-r--r--src/Xmobar.hs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index a65a236..1ae55bb 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -145,11 +145,17 @@ eventLoop tv xc@(XConf d _ w fs cfg) signal = do
Toggle -> toggle
where
- hide = hideWindow d w >> eventLoop tv xc signal
- reveal = do
- r' <- repositionWin d w fs cfg
- showWindow d w
- eventLoop tv (XConf d r' w fs cfg) signal
+ isPersistent = not $ persistent cfg
+
+ hide = when isPersistent (hideWindow d w) >> eventLoop tv xc signal
+
+ reveal = if isPersistent
+ then do
+ r' <- repositionWin d w fs cfg
+ showWindow d w
+ eventLoop tv (XConf d r' w fs cfg) signal
+ else eventLoop tv xc signal
+
toggle = isMapped d w >>= \b -> if b then hide else reveal
reposWindow rcfg = do