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

18 lines
370 B
JavaScript

const { Window, EventBox } = ags.Widget;
const { windows, closeWindow } = ags.App;
export const Closer = Window({
name: 'closer',
popup: true,
layer: 'top',
anchor: 'top bottom left right',
child: EventBox({
onPrimaryClickRelease: () => {
windows.forEach(w => {
if (w.name != 'bar')
closeWindow(w.name)
});
},
}),
});