notifpopups: close after timeout if transient
Also prefix window namespaces with caelestia
This commit is contained in:
parent
006e83279a
commit
c289dd63b6
2 changed files with 12 additions and 11 deletions
|
|
@ -259,7 +259,7 @@ const Power = () => (
|
||||||
|
|
||||||
export default ({ monitor }: { monitor: AstalHyprland.Monitor }) => (
|
export default ({ monitor }: { monitor: AstalHyprland.Monitor }) => (
|
||||||
<window
|
<window
|
||||||
namespace="bar"
|
namespace="caelestia-bar"
|
||||||
monitor={monitor.id}
|
monitor={monitor.id}
|
||||||
anchor={Astal.WindowAnchor.TOP}
|
anchor={Astal.WindowAnchor.TOP}
|
||||||
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
||||||
|
|
|
||||||
|
|
@ -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;`;
|
this.css = `transition: 150ms cubic-bezier(0.05, 0.9, 0.1, 1.1); margin-left: 0; margin-right: 0;`;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Close popup after timeout
|
// Close popup after timeout if transient
|
||||||
// timeout(
|
if (notification.transient)
|
||||||
// notification.expireTimeout > 0
|
timeout(
|
||||||
// ? notification.expireTimeout
|
notification.expireTimeout > 0
|
||||||
// : notification.urgency === AstalNotifd.Urgency.CRITICAL
|
? notification.expireTimeout
|
||||||
// ? 10000
|
: notification.urgency === AstalNotifd.Urgency.CRITICAL
|
||||||
// : 5000,
|
? 10000
|
||||||
// () => this.destroyWithAnims()
|
: 5000,
|
||||||
// );
|
() => this.destroyWithAnims()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
destroyWithAnims() {
|
destroyWithAnims() {
|
||||||
|
|
@ -121,7 +122,7 @@ class NotifPopup extends Widget.Box {
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
<window
|
<window
|
||||||
namespace="notifpopups"
|
namespace="caelestia-notifpopups"
|
||||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT | Astal.WindowAnchor.BOTTOM}
|
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT | Astal.WindowAnchor.BOTTOM}
|
||||||
>
|
>
|
||||||
<box
|
<box
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue