summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-04-18 15:59:51 +0100
committerjao <jao@gnu.org>2022-04-18 15:59:51 +0100
commit082ef98c1c265ad927b728402d8803a86bbbaeef (patch)
tree91987bcefd64e341c2c887b6e354b5499beb2966 /src/Xmobar
parent369d04932c521f6ee7addfc1e5149a8c1d073b84 (diff)
downloadxmobar-082ef98c1c265ad927b728402d8803a86bbbaeef.tar.gz
xmobar-082ef98c1c265ad927b728402d8803a86bbbaeef.tar.bz2
New dbus signal: SetAlpha (fixes #499)
Diffstat (limited to 'src/Xmobar')
-rw-r--r--src/Xmobar/System/Signal.hs1
-rw-r--r--src/Xmobar/X11/Loop.hs3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/Xmobar/System/Signal.hs b/src/Xmobar/System/Signal.hs
index 3983654..81a4481 100644
--- a/src/Xmobar/System/Signal.hs
+++ b/src/Xmobar/System/Signal.hs
@@ -46,6 +46,7 @@ data SignalType = Wakeup
| Hide Int
| Reveal Int
| Toggle Int
+ | SetAlpha Int
| TogglePersistent
| Action Button Position
deriving (Read, Show)
diff --git a/src/Xmobar/X11/Loop.hs b/src/Xmobar/X11/Loop.hs
index 9c1a0f0..631855c 100644
--- a/src/Xmobar/X11/Loop.hs
+++ b/src/Xmobar/X11/Loop.hs
@@ -39,6 +39,7 @@ import qualified Data.List.NonEmpty as NE
import Xmobar.System.Signal
import Xmobar.Config.Types ( persistent
+ , alpha
, font
, additionalFonts
, textOffset
@@ -146,6 +147,8 @@ signalLoop xc@(XConf d r w fs vos is cfg) as signal tv = do
TogglePersistent -> signalLoop
xc { config = cfg { persistent = not $ persistent cfg } } as signal tv
+ SetAlpha a -> signalLoop xc { config = cfg { alpha = a}} as signal tv
+
Action but x -> action but x
where