summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/bar.tsx15
-rw-r--r--src/modules/notifpopups.tsx2
2 files changed, 14 insertions, 3 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>
);
diff --git a/src/modules/notifpopups.tsx b/src/modules/notifpopups.tsx
index 0332fa7..d3cbb90 100644
--- a/src/modules/notifpopups.tsx
+++ b/src/modules/notifpopups.tsx
@@ -19,7 +19,7 @@ export default () => (
let notifsOpen = false;
self.hook(notifd, "notified", (self, id) => {
- if (notifsOpen) return;
+ if (notifsOpen || notifd.dontDisturb) return;
const notification = notifd.get_notification(id);