diff --git a/config/ags/closer/closer.js b/config/ags/closer/closer.js new file mode 100644 index 00000000..a9708057 --- /dev/null +++ b/config/ags/closer/closer.js @@ -0,0 +1,13 @@ +export const Closer = ags.Widget.Window({ + name: 'closer', + popup: true, + layer: 'top', + anchor: 'top bottom left right', + + child: ags.Widget.EventBox({ + onPrimaryClickRelease: () => { + ags.App.closeWindow('powermenu'); + ags.App.closeWindow('closer'); + }, + }), +}); diff --git a/config/ags/config.js b/config/ags/config.js index 35e76539..8725d85b 100644 --- a/config/ags/config.js +++ b/config/ags/config.js @@ -1,5 +1,6 @@ import { execAsync, writeFile } from 'resource:///com/github/Aylur/ags/utils.js'; import { Powermenu } from 'file:///home/matt/.nix/config/ags/powermenu/powermenu.js'; +import { Closer } from 'file:///home/matt/.nix/config/ags/closer/closer.js'; const scss = ags.App.configDir + '/style.scss'; const css = ags.App.configDir + '/style.css'; @@ -10,6 +11,7 @@ ags.Utils.exec(`sassc ${scss} ${css}`); export default { style: css, windows: [ - Powermenu + Powermenu, + Closer, ] }