mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 20:31:57 +00:00
ags: sync
This commit is contained in:
parent
5d067e3685
commit
b7d2d2bd4f
3 changed files with 20 additions and 22 deletions
|
|
@ -86,7 +86,7 @@ export const AnimatedCircProg = ({
|
|||
// area.css = `font-size: ${initFrom}px; transition: ${initAnimTime}ms linear;`;
|
||||
Utils.timeout(20, () => {
|
||||
area.css = `font-size: ${initTo}px;`;
|
||||
})
|
||||
}, area)
|
||||
// const transitionDistance = initTo - initFrom;
|
||||
// const oneStep = initAnimTime / initAnimPoints;
|
||||
// area.css = `
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
const { GLib, Gdk, Gtk } = imports.gi;
|
||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js'
|
||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'
|
||||
const { lookUpIcon, timeout } = Utils;
|
||||
const { Box, EventBox, Icon, Overlay, Label, Button, Revealer } = Widget;
|
||||
import { MaterialIcon } from "./materialicon.js";
|
||||
import { setupCursorHover } from "./cursorhover.js";
|
||||
|
|
@ -38,9 +37,9 @@ const NotificationIcon = (notifObject) => {
|
|||
}
|
||||
|
||||
let icon = 'NO_ICON';
|
||||
if (lookUpIcon(notifObject.appIcon))
|
||||
if (Utils.lookUpIcon(notifObject.appIcon))
|
||||
icon = notifObject.appIcon;
|
||||
if (lookUpIcon(notifObject.appEntry))
|
||||
if (Utils.lookUpIcon(notifObject.appEntry))
|
||||
icon = notifObject.appEntry;
|
||||
|
||||
return Box({
|
||||
|
|
@ -58,7 +57,7 @@ const NotificationIcon = (notifObject) => {
|
|||
const width = styleContext.get_property('min-width', Gtk.StateFlags.NORMAL);
|
||||
const height = styleContext.get_property('min-height', Gtk.StateFlags.NORMAL);
|
||||
self.size = Math.max(width * 0.7, height * 0.7, 1); // im too lazy to add another box lol
|
||||
}),
|
||||
}, self),
|
||||
})
|
||||
:
|
||||
MaterialIcon(`${notifObject.urgency == 'critical' ? 'release_alert' : guessMessageType(notifObject.summary.toLowerCase())}`, 'hugerass', {
|
||||
|
|
@ -84,11 +83,11 @@ export default ({
|
|||
notificationBox.setCss(middleClickClose);
|
||||
Utils.timeout(200, () => {
|
||||
wholeThing.revealChild = false;
|
||||
});
|
||||
}, wholeThing);
|
||||
Utils.timeout(400, () => {
|
||||
command();
|
||||
wholeThing.destroy();
|
||||
});
|
||||
}, wholeThing);
|
||||
}
|
||||
const widget = EventBox({
|
||||
onHover: (self) => {
|
||||
|
|
@ -382,11 +381,11 @@ export default ({
|
|||
}
|
||||
Utils.timeout(200, () => {
|
||||
wholeThing.revealChild = false
|
||||
});
|
||||
}, wholeThing);
|
||||
Utils.timeout(400, () => {
|
||||
command();
|
||||
wholeThing.destroy();
|
||||
});
|
||||
}, wholeThing);
|
||||
}
|
||||
else {
|
||||
self.setCss(`transition: margin 200ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 200ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
||||
|
|
|
|||
|
|
@ -275,19 +275,18 @@ const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) =>
|
|||
}).catch(print);
|
||||
}
|
||||
},
|
||||
setup: (box) => {
|
||||
box
|
||||
// .hook(Hyprland, (box, name, data) => { // idk, does this make it lag occasionally?
|
||||
// console.log(name)
|
||||
// if (["changefloatingmode", "movewindow"].includes(name))
|
||||
// box.attribute.update(box);
|
||||
// }, 'event')
|
||||
.hook(Hyprland, (box) => box.attribute.update(box), 'client-added')
|
||||
.hook(Hyprland, (box) => box.attribute.update(box), 'client-removed')
|
||||
.hook(App, (box, name, visible) => { // Update on open
|
||||
if (name == 'overview' && visible) box.attribute.update(box);
|
||||
})
|
||||
},
|
||||
setup: (box) => box
|
||||
// .hook(Hyprland, (box, name, data) => { // idk, does this make it lag occasionally?
|
||||
// console.log(name)
|
||||
// if (["changefloatingmode", "movewindow"].includes(name))
|
||||
// box.attribute.update(box);
|
||||
// }, 'event')
|
||||
.hook(Hyprland, (box) => box.attribute.update(box), 'client-added')
|
||||
.hook(Hyprland, (box) => box.attribute.update(box), 'client-removed')
|
||||
.hook(App, (box, name, visible) => { // Update on open
|
||||
if (name == 'overview' && visible) box.attribute.update(box);
|
||||
})
|
||||
,
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue