From c289dd63b657fab70a2ae1adefcba14cc773681e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 13 Jan 2025 11:48:06 +1100 Subject: notifpopups: close after timeout if transient Also prefix window namespaces with caelestia --- modules/bar.tsx | 2 +- modules/notifpopups.tsx | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'modules') diff --git a/modules/bar.tsx b/modules/bar.tsx index b7ffb56..bf1bb9f 100644 --- a/modules/bar.tsx +++ b/modules/bar.tsx @@ -259,7 +259,7 @@ const Power = () => ( export default ({ monitor }: { monitor: AstalHyprland.Monitor }) => ( 0 - // ? notification.expireTimeout - // : notification.urgency === AstalNotifd.Urgency.CRITICAL - // ? 10000 - // : 5000, - // () => this.destroyWithAnims() - // ); + // Close popup after timeout if transient + if (notification.transient) + timeout( + notification.expireTimeout > 0 + ? notification.expireTimeout + : notification.urgency === AstalNotifd.Urgency.CRITICAL + ? 10000 + : 5000, + () => this.destroyWithAnims() + ); } destroyWithAnims() { @@ -121,7 +122,7 @@ class NotifPopup extends Widget.Box { export default () => (