mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-16 22:09:59 -05:00
17 lines
557 B
JavaScript
17 lines
557 B
JavaScript
import App from 'resource:///com/github/Aylur/ags/app.js';
|
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
|
const { Box, EventBox } = Widget;
|
|
|
|
export const clickCloseRegion = ({ name, multimonitor = true, expand = true }) => {
|
|
return EventBox({
|
|
child: Box({ expand: expand }),
|
|
setup: (self) => self.on('button-press-event', (self, event) => { // Any mouse button
|
|
if (multimonitor) closeWindowOnAllMonitors(name);
|
|
else App.closeWindow(name);
|
|
}),
|
|
})
|
|
}
|
|
|
|
export default clickCloseRegion;
|
|
|