diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-13 11:48:06 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-13 11:48:06 +1100 |
| commit | c289dd63b657fab70a2ae1adefcba14cc773681e (patch) | |
| tree | 5e90fd15a8916667069921717bb32737804728f7 /modules | |
| parent | notifpopups: use correct exclusivity (diff) | |
| download | caelestia-shell-c289dd63b657fab70a2ae1adefcba14cc773681e.tar.gz caelestia-shell-c289dd63b657fab70a2ae1adefcba14cc773681e.tar.bz2 caelestia-shell-c289dd63b657fab70a2ae1adefcba14cc773681e.zip | |
notifpopups: close after timeout if transient
Also prefix window namespaces with caelestia
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/bar.tsx | 2 | ||||
| -rw-r--r-- | modules/notifpopups.tsx | 21 |
2 files changed, 12 insertions, 11 deletions
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 }) => ( <window - namespace="bar" + namespace="caelestia-bar" monitor={monitor.id} anchor={Astal.WindowAnchor.TOP} exclusivity={Astal.Exclusivity.EXCLUSIVE} diff --git a/modules/notifpopups.tsx b/modules/notifpopups.tsx index b4cb899..f83d9de 100644 --- a/modules/notifpopups.tsx +++ b/modules/notifpopups.tsx @@ -93,15 +93,16 @@ class NotifPopup extends Widget.Box { this.css = `transition: 150ms cubic-bezier(0.05, 0.9, 0.1, 1.1); margin-left: 0; margin-right: 0;`; }); - // Close popup after timeout - // timeout( - // notification.expireTimeout > 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 () => ( <window - namespace="notifpopups" + namespace="caelestia-notifpopups" anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT | Astal.WindowAnchor.BOTTOM} > <box |