summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Signal.hs1
-rw-r--r--src/Xmobar.hs3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/Signal.hs b/src/Signal.hs
index 0acdea1..ad19fdd 100644
--- a/src/Signal.hs
+++ b/src/Signal.hs
@@ -16,6 +16,7 @@ data SignalType = Wakeup
| Hide
| Reveal
| Toggle
+ | TogglePersistent
deriving (Read, Show)
-- | Signal handling
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index 1ae55bb..adbe956 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -144,6 +144,9 @@ eventLoop tv xc@(XConf d _ w fs cfg) signal = do
Reveal -> reveal
Toggle -> toggle
+ TogglePersistent -> eventLoop
+ tv xc { config = cfg { persistent = not $ persistent cfg } } signal
+
where
isPersistent = not $ persistent cfg