summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/notifpopups.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/notifpopups.tsx b/src/modules/notifpopups.tsx
index c3f687a..0332fa7 100644
--- a/src/modules/notifpopups.tsx
+++ b/src/modules/notifpopups.tsx
@@ -31,8 +31,12 @@ export default () => (
self.add(
<eventbox
onClick={(_, event) => {
- // Go to notif center on primary click
- if (event.button === Astal.MouseButton.PRIMARY) App.get_window("notifications")?.show();
+ // Activate notif or go to notif center on primary click
+ if (event.button === Astal.MouseButton.PRIMARY) {
+ if (notification.actions.length === 1)
+ notification.invoke(notification.actions[0].id);
+ else App.get_window("notifications")?.show();
+ }
// Dismiss on middle click
else if (event.button === Astal.MouseButton.MIDDLE) notification.dismiss();
}}