mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
chore: update ags and remove deprecated stuff
This commit is contained in:
parent
aba3be7be1
commit
875b439b84
6 changed files with 32 additions and 30 deletions
|
|
@ -57,7 +57,7 @@ const Windows = () => [
|
|||
forMonitors((id) => Corner(id, 'bottom right')),
|
||||
];
|
||||
const CLOSE_ANIM_TIME = 210; // Longer than actual anim time to make sure widgets animate fully
|
||||
export default {
|
||||
App.config({
|
||||
css: `${COMPILED_STYLE_DIR}/style.css`,
|
||||
stackTraceOnError: true,
|
||||
closeWindowDelay: { // For animations
|
||||
|
|
@ -66,7 +66,7 @@ export default {
|
|||
'osk': CLOSE_ANIM_TIME,
|
||||
},
|
||||
windows: Windows().flat(1),
|
||||
};
|
||||
});
|
||||
|
||||
// Stuff that don't need to be toggled. And they're async so ugh...
|
||||
// Bar().catch(print); // Use this to debug the bar. Single monitor only.
|
||||
|
|
|
|||
|
|
@ -6,25 +6,27 @@ const { Box, Window } = Widget;
|
|||
export default ({
|
||||
name,
|
||||
child,
|
||||
showClassName,
|
||||
hideClassName,
|
||||
showClassName = "",
|
||||
hideClassName = "",
|
||||
...props
|
||||
}) => Window({
|
||||
name,
|
||||
popup: true,
|
||||
visible: false,
|
||||
layer: 'overlay',
|
||||
...props,
|
||||
}) => {
|
||||
return Window({
|
||||
name,
|
||||
visible: false,
|
||||
layer: 'overlay',
|
||||
...props,
|
||||
|
||||
child: Box({
|
||||
className: `${showClassName} ${hideClassName}`,
|
||||
setup: (self) => self
|
||||
.hook(App, (self, currentName, visible) => {
|
||||
if (currentName === name) {
|
||||
self.toggleClassName(hideClassName, !visible);
|
||||
}
|
||||
})
|
||||
,
|
||||
child: child,
|
||||
}),
|
||||
});
|
||||
child: Box({
|
||||
setup: (self) => {
|
||||
self.hook(App, (self, currentName, visible) => {
|
||||
if (currentName === name) {
|
||||
self.toggleClassName(hideClassName, !visible);
|
||||
}
|
||||
}).keybind("Escape", () => App.closeWindow(name))
|
||||
if (showClassName !== "" && hideClassName !== "")
|
||||
self.className = `${showClassName} ${hideClassName}`;
|
||||
},
|
||||
child: child,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
|||
import Service from 'resource:///com/github/Aylur/ags/service.js';
|
||||
import { Keybinds } from "./keybinds.js";
|
||||
import { setupCursorHover } from "../.widgetutils/cursorhover.js";
|
||||
import PopupWindow from '../.widgethacks/popupwindow.js';
|
||||
|
||||
const cheatsheetHeader = () => Widget.CenterBox({
|
||||
vertical: false,
|
||||
|
|
@ -68,11 +69,10 @@ const clickOutsideToClose = Widget.EventBox({
|
|||
onMiddleClick: () => App.closeWindow('cheatsheet'),
|
||||
});
|
||||
|
||||
export default () => Widget.Window({
|
||||
export default () => PopupWindow({
|
||||
name: 'cheatsheet',
|
||||
exclusivity: 'ignore',
|
||||
keymode: 'exclusive',
|
||||
popup: true,
|
||||
visible: false,
|
||||
child: Widget.Box({
|
||||
vertical: true,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { SearchAndWindows } from "./windowcontent.js";
|
||||
import PopupWindow from '../.widgethacks/popupwindow.js';
|
||||
|
||||
export default () => Widget.Window({
|
||||
name: 'overview',
|
||||
export default (id = '') => PopupWindow({
|
||||
name: `overview${id}`,
|
||||
exclusivity: 'ignore',
|
||||
keymode: 'exclusive',
|
||||
popup: true,
|
||||
visible: false,
|
||||
anchor: ['top'],
|
||||
layer: 'overlay',
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import SessionScreen from "./sessionscreen.js";
|
||||
import PopupWindow from '../.widgethacks/popupwindow.js';
|
||||
|
||||
export default () => Widget.Window({ // On-screen keyboard
|
||||
export default () => PopupWindow({ // On-screen keyboard
|
||||
name: 'session',
|
||||
popup: true,
|
||||
visible: false,
|
||||
keymode: 'exclusive',
|
||||
layer: 'overlay',
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ install-ags (){
|
|||
try git init -b main
|
||||
try git remote add origin https://github.com/Aylur/ags.git
|
||||
x git pull origin main && git submodule update --init --recursive
|
||||
x git checkout e257efa0a13c50538bed77ca6e557dc4dd3a3482 # add Widget.keybind #248
|
||||
x git checkout b40b8d81c5543ef02caee67560ab1c13ebcee49a # "update examples"
|
||||
x npm install
|
||||
x meson setup build
|
||||
x meson install -C build
|
||||
|
|
|
|||
Loading…
Reference in a new issue