nixos-configs/config/ags/js/misc/closer.js

22 lines
437 B
JavaScript
Raw Normal View History

const { Window, EventBox } = ags.Widget;
const { closeWindow } = ags.App;
export const closeAll = () => {
ags.App.windows.forEach(w => {
if (w.name != 'bar' &&
w.name != 'notifications')
ags.App.closeWindow(w.name)
});
};
export const Closer = Window({
2023-09-11 19:57:21 -04:00
name: 'closer',
popup: true,
layer: 'top',
anchor: 'top bottom left right',
child: EventBox({
onPrimaryClickRelease: () => closeAll(),
2023-09-11 19:57:21 -04:00
}),
});