Compare commits

..

2 commits

4 changed files with 29 additions and 22 deletions

View file

@ -87,7 +87,10 @@ const NotificationIcon = notif => {
}); });
}; };
export default ({ notif, command = () => {} } = {}) => { export default ({
notif,
command = () => {},
} = {}) => {
const BlockedApps = [ const BlockedApps = [
'Spotify', 'Spotify',
]; ];

View file

@ -101,7 +101,8 @@ export default ({
self.setStyle(`transition: margin 0.5s ease, opacity 0.5s ease; self.setStyle(`transition: margin 0.5s ease, opacity 0.5s ease;
margin-left: ${startMargin}px; margin-left: ${startMargin}px;
margin-right: ${startMargin}px; margin-right: ${startMargin}px;
margin-bottom: unset; margin-top: unset; opacity: 1;`); margin-bottom: unset; margin-top: unset;
opacity: 1;`);
}); });
Utils.timeout(1000, () => self._ready = true); Utils.timeout(1000, () => self._ready = true);
return; return;
@ -127,7 +128,8 @@ export default ({
self.setStyle(`transition: margin 0.5s ease, opacity 0.5s ease; self.setStyle(`transition: margin 0.5s ease, opacity 0.5s ease;
margin-left: ${startMargin}px; margin-left: ${startMargin}px;
margin-right: ${startMargin}px; margin-right: ${startMargin}px;
margin-bottom: unset; margin-top: unset; opacity: 1;`); margin-bottom: unset; margin-top: unset;
opacity: 1;`);
if (widget.window) if (widget.window)
widget.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab')); widget.window.set_cursor(Gdk.Cursor.new_from_name(display, 'grab'));

View file

@ -12,18 +12,15 @@ const Popups = () => Box({
['map', new Map()], ['map', new Map()],
['dismiss', (box, id, force = false) => { ['dismiss', (box, id, force = false) => {
if (!id || !box._map.has(id) || if (!id || !box._map.has(id) || box._map.get(id)._hovered && !force)
box._map.get(id)._hovered && !force)
return; return;
if (box._map.size - 1 === 0) if (box._map.size - 1 === 0)
box.get_parent().reveal_child = false; box.get_parent().reveal_child = false;
Utils.timeout(200, () => { Utils.timeout(200, () => {
if (box._map.get(id)?.interval) { if (box._map.get(id)?.interval) {
box._map.get(id).interval.destroy(); GLib.source_remove(box._map.get(id).interval);
box._map.get(id).interval = undefined; box._map.get(id).interval = undefined;
} }
box._map.get(id)?.destroy(); box._map.get(id)?.destroy();
@ -53,12 +50,14 @@ const Popups = () => Box({
}); });
box._map.get(id).interval = Utils.interval(4500, () => { box._map.get(id).interval = Utils.interval(4500, () => {
if (!box._map.get(id)._hovered) { const notif = box._map.get(id);
box._map.get(id).child.setStyle(box._map.get(id).child._leftAnim1); if (!notif._hovered) {
notif.child.setStyle(notif.child._leftAnim1);
if (box._map.get(id).interval) { if (notif.interval) {
GLib.source_remove(box._map.get(id).interval); Utils.timeout(500, () => notif.destroy());
box._map.get(id).interval = undefined; GLib.source_remove(notif.interval);
notif.interval = undefined;
} }
} }
}); });

View file

@ -105,6 +105,8 @@ animations {
enabled = yes enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05 bezier = myBezier, 0.05, 0.9, 0.1, 1.05
bezier = easeInOutBack, 0.68, -0.6, 0.32, 1.6
bezier = easeInBack, 0.36, 0, 0.66, -0.56 bezier = easeInBack, 0.36, 0, 0.66, -0.56
bezier = easeOutBack, 0.34, 1.56, 0.64, 1 bezier = easeOutBack, 0.34, 1.56, 0.64, 1
bezier = softEaseOutBack, 0.34, 1.26, 0.64, 1 bezier = softEaseOutBack, 0.34, 1.26, 0.64, 1
@ -112,6 +114,7 @@ animations {
animation = windows, 1, 7, myBezier animation = windows, 1, 7, myBezier
animation = windowsIn, 1, 7, easeOutBack, slide animation = windowsIn, 1, 7, easeOutBack, slide
animation = windowsOut, 1, 7, easeInBack, slide animation = windowsOut, 1, 7, easeInBack, slide
animation = windowsMove, 1, 7, easeOutBack, slide
animation = workspaces, 1, 6, softEaseOutBack, slide animation = workspaces, 1, 6, softEaseOutBack, slide