diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-11 15:55:32 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-11 15:55:32 +1100 |
| commit | 877c254740e8d1ee7e1e04adad90631b617f1ead (patch) | |
| tree | 2c75011f48384b6301ef16d225636ee90b6a16c5 /src/modules/bar.tsx | |
| parent | launcher: fix actions not clearing in math mode (diff) | |
| download | caelestia-shell-877c254740e8d1ee7e1e04adad90631b617f1ead.tar.gz caelestia-shell-877c254740e8d1ee7e1e04adad90631b617f1ead.tar.bz2 caelestia-shell-877c254740e8d1ee7e1e04adad90631b617f1ead.zip | |
notifs: make dnd actually work
Also change bar icon and hide count when dnd
Diffstat (limited to 'src/modules/bar.tsx')
| -rw-r--r-- | src/modules/bar.tsx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/modules/bar.tsx b/src/modules/bar.tsx index c2695c4..85d2add 100644 --- a/src/modules/bar.tsx +++ b/src/modules/bar.tsx @@ -459,8 +459,19 @@ const NotifCount = () => ( } > <box vertical={bind(config.vertical)} className="module notif-count"> - <label className="icon" label="info" /> - <label label={bind(AstalNotifd.get_default(), "notifications").as(n => String(n.length))} /> + <label + className="icon" + label={bind(AstalNotifd.get_default(), "dontDisturb").as(d => (d ? "notifications_off" : "info"))} + /> + <revealer + transitionType={bind(config.vertical).as(v => + v ? Gtk.RevealerTransitionType.SLIDE_DOWN : Gtk.RevealerTransitionType.SLIDE_RIGHT + )} + transitionDuration={120} + revealChild={bind(AstalNotifd.get_default(), "dontDisturb").as(d => !d)} + > + <label label={bind(AstalNotifd.get_default(), "notifications").as(n => String(n.length))} /> + </revealer> </box> </button> ); |