2023-10-02 12:06:35 -04:00
|
|
|
import { Widget } from '../imports.js';
|
2023-10-08 00:43:35 -04:00
|
|
|
const { CenterBox, Label } = Widget;
|
2023-09-21 20:01:14 -04:00
|
|
|
|
2023-10-17 13:47:02 -04:00
|
|
|
import PopupWindow from './misc/popup.js';
|
|
|
|
import Button from './misc/cursorbox.js'
|
2023-08-27 10:31:41 -04:00
|
|
|
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2023-10-17 13:47:02 -04:00
|
|
|
const PowermenuWidget = () => CenterBox({
|
2023-09-21 20:01:14 -04:00
|
|
|
className: 'powermenu',
|
|
|
|
vertical: false,
|
2023-08-27 10:31:41 -04:00
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
startWidget: Button({
|
2023-10-17 13:47:02 -04:00
|
|
|
type: "Button",
|
2023-09-21 20:01:14 -04:00
|
|
|
className: 'shutdown',
|
|
|
|
onPrimaryClickRelease: 'systemctl poweroff',
|
2023-08-27 10:31:41 -04:00
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
child: Label({
|
|
|
|
label: '襤',
|
2023-08-27 10:31:41 -04:00
|
|
|
}),
|
2023-09-21 20:01:14 -04:00
|
|
|
}),
|
2023-08-27 10:31:41 -04:00
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
centerWidget: Button({
|
2023-10-17 13:47:02 -04:00
|
|
|
type: "Button",
|
2023-09-21 20:01:14 -04:00
|
|
|
className: 'reboot',
|
|
|
|
onPrimaryClickRelease: 'systemctl reboot',
|
2023-08-27 10:31:41 -04:00
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
child: Label({
|
|
|
|
label: '勒',
|
2023-08-27 10:31:41 -04:00
|
|
|
}),
|
2023-09-21 20:01:14 -04:00
|
|
|
}),
|
2023-08-27 10:31:41 -04:00
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
endWidget: Button({
|
2023-10-17 13:47:02 -04:00
|
|
|
type: "Button",
|
2023-09-21 20:01:14 -04:00
|
|
|
className: 'logout',
|
|
|
|
onPrimaryClickRelease: 'hyprctl dispatch exit',
|
2023-08-27 10:31:41 -04:00
|
|
|
|
2023-09-21 20:01:14 -04:00
|
|
|
child: Label({
|
|
|
|
label: '',
|
2023-08-27 10:31:41 -04:00
|
|
|
}),
|
|
|
|
}),
|
|
|
|
});
|
2023-09-21 20:01:14 -04:00
|
|
|
|
2023-10-16 18:11:19 -04:00
|
|
|
export default () => PopupWindow({
|
2023-09-21 20:01:14 -04:00
|
|
|
name: 'powermenu',
|
2023-10-08 00:43:35 -04:00
|
|
|
transition: 'crossfade',
|
2023-10-17 13:47:02 -04:00
|
|
|
child: PowermenuWidget(),
|
2023-09-21 20:01:14 -04:00
|
|
|
});
|