nixos-configs/devices/wim/config/ags/js/powermenu.js

47 lines
1,000 B
JavaScript
Raw Normal View History

import { CenterBox, Label } from 'resource:///com/github/Aylur/ags/widget.js';
import PopupWindow from './misc/popup.js';
import Button from './misc/cursorbox.js';
2023-08-27 10:31:41 -04:00
const PowermenuWidget = () => CenterBox({
className: 'powermenu',
vertical: false,
2023-08-27 10:31:41 -04:00
startWidget: Button({
type: 'Button',
className: 'shutdown',
onPrimaryClickRelease: 'systemctl poweroff',
2023-08-27 10:31:41 -04:00
child: Label({
label: '襤',
}),
2023-08-27 10:31:41 -04:00
}),
centerWidget: Button({
type: 'Button',
className: 'reboot',
onPrimaryClickRelease: 'systemctl reboot',
2023-08-27 10:31:41 -04:00
child: Label({
label: '勒',
}),
2023-08-27 10:31:41 -04:00
}),
endWidget: Button({
type: 'Button',
className: 'logout',
onPrimaryClickRelease: 'hyprctl dispatch exit',
2023-08-27 10:31:41 -04:00
child: Label({
label: '',
}),
2023-08-27 10:31:41 -04:00
}),
});
export default () => PopupWindow({
name: 'powermenu',
transition: 'crossfade',
child: PowermenuWidget(),
});