forked from Shinonome/dots-hyprland
ags: sync
This commit is contained in:
@@ -86,7 +86,7 @@ export const AnimatedCircProg = ({
|
|||||||
// area.css = `font-size: ${initFrom}px; transition: ${initAnimTime}ms linear;`;
|
// area.css = `font-size: ${initFrom}px; transition: ${initAnimTime}ms linear;`;
|
||||||
Utils.timeout(20, () => {
|
Utils.timeout(20, () => {
|
||||||
area.css = `font-size: ${initTo}px;`;
|
area.css = `font-size: ${initTo}px;`;
|
||||||
})
|
}, area)
|
||||||
// const transitionDistance = initTo - initFrom;
|
// const transitionDistance = initTo - initFrom;
|
||||||
// const oneStep = initAnimTime / initAnimPoints;
|
// const oneStep = initAnimTime / initAnimPoints;
|
||||||
// area.css = `
|
// area.css = `
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
const { GLib, Gdk, Gtk } = imports.gi;
|
const { GLib, Gdk, Gtk } = imports.gi;
|
||||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js'
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js'
|
||||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.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;
|
const { Box, EventBox, Icon, Overlay, Label, Button, Revealer } = Widget;
|
||||||
import { MaterialIcon } from "./materialicon.js";
|
import { MaterialIcon } from "./materialicon.js";
|
||||||
import { setupCursorHover } from "./cursorhover.js";
|
import { setupCursorHover } from "./cursorhover.js";
|
||||||
@@ -38,9 +37,9 @@ const NotificationIcon = (notifObject) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let icon = 'NO_ICON';
|
let icon = 'NO_ICON';
|
||||||
if (lookUpIcon(notifObject.appIcon))
|
if (Utils.lookUpIcon(notifObject.appIcon))
|
||||||
icon = notifObject.appIcon;
|
icon = notifObject.appIcon;
|
||||||
if (lookUpIcon(notifObject.appEntry))
|
if (Utils.lookUpIcon(notifObject.appEntry))
|
||||||
icon = notifObject.appEntry;
|
icon = notifObject.appEntry;
|
||||||
|
|
||||||
return Box({
|
return Box({
|
||||||
@@ -58,7 +57,7 @@ const NotificationIcon = (notifObject) => {
|
|||||||
const width = styleContext.get_property('min-width', Gtk.StateFlags.NORMAL);
|
const width = styleContext.get_property('min-width', Gtk.StateFlags.NORMAL);
|
||||||
const height = styleContext.get_property('min-height', 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.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', {
|
MaterialIcon(`${notifObject.urgency == 'critical' ? 'release_alert' : guessMessageType(notifObject.summary.toLowerCase())}`, 'hugerass', {
|
||||||
@@ -84,11 +83,11 @@ export default ({
|
|||||||
notificationBox.setCss(middleClickClose);
|
notificationBox.setCss(middleClickClose);
|
||||||
Utils.timeout(200, () => {
|
Utils.timeout(200, () => {
|
||||||
wholeThing.revealChild = false;
|
wholeThing.revealChild = false;
|
||||||
});
|
}, wholeThing);
|
||||||
Utils.timeout(400, () => {
|
Utils.timeout(400, () => {
|
||||||
command();
|
command();
|
||||||
wholeThing.destroy();
|
wholeThing.destroy();
|
||||||
});
|
}, wholeThing);
|
||||||
}
|
}
|
||||||
const widget = EventBox({
|
const widget = EventBox({
|
||||||
onHover: (self) => {
|
onHover: (self) => {
|
||||||
@@ -382,11 +381,11 @@ export default ({
|
|||||||
}
|
}
|
||||||
Utils.timeout(200, () => {
|
Utils.timeout(200, () => {
|
||||||
wholeThing.revealChild = false
|
wholeThing.revealChild = false
|
||||||
});
|
}, wholeThing);
|
||||||
Utils.timeout(400, () => {
|
Utils.timeout(400, () => {
|
||||||
command();
|
command();
|
||||||
wholeThing.destroy();
|
wholeThing.destroy();
|
||||||
});
|
}, wholeThing);
|
||||||
}
|
}
|
||||||
else {
|
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);
|
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);
|
}).catch(print);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup: (box) => {
|
setup: (box) => box
|
||||||
box
|
// .hook(Hyprland, (box, name, data) => { // idk, does this make it lag occasionally?
|
||||||
// .hook(Hyprland, (box, name, data) => { // idk, does this make it lag occasionally?
|
// console.log(name)
|
||||||
// console.log(name)
|
// if (["changefloatingmode", "movewindow"].includes(name))
|
||||||
// if (["changefloatingmode", "movewindow"].includes(name))
|
// box.attribute.update(box);
|
||||||
// box.attribute.update(box);
|
// }, 'event')
|
||||||
// }, 'event')
|
.hook(Hyprland, (box) => box.attribute.update(box), 'client-added')
|
||||||
.hook(Hyprland, (box) => box.attribute.update(box), 'client-added')
|
.hook(Hyprland, (box) => box.attribute.update(box), 'client-removed')
|
||||||
.hook(Hyprland, (box) => box.attribute.update(box), 'client-removed')
|
.hook(App, (box, name, visible) => { // Update on open
|
||||||
.hook(App, (box, name, visible) => { // Update on open
|
if (name == 'overview' && visible) box.attribute.update(box);
|
||||||
if (name == 'overview' && visible) box.attribute.update(box);
|
})
|
||||||
})
|
,
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user