dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search feat(quickshell): add confirmed power menu
f8525cba45bedb1b8d0e5777beae29da74b5d356
Oliver Jan Krylow <oliver@bugabinga.net > · 17 Jun 2026
unsigned
Browse files Compare with HEAD
Changed files (5) docs/super/inventory/2026-06-17-quickshell-phase-4d-power-verification.md Added new file mode 100644 1 + #
Quickshell Phase 4D Power Confirmation Verification — 2026-06-17 5 + Added a standalone Quickshell power menu IPC surface. This is the future `CTRL+ALT+Delete` replacement for `hyprshutdown --dry-run` and the Ironbar power popup. Live Hypr binds are not migrated yet.
9 + - `quickshell/nugu/PowerMenu.qml`
10 + - `quickshell/nugu/Commands.qml` confirmed power boundary
11 + - `quickshell/nugu/shell.qml` IPC wiring
12 + - `quickshell/nugu/README.md` usage notes
16 + The menu includes the current action set:
24 + Actions are two-step through `requestPowerAction(...)` then `confirmPowerAction()`. Confirmed non-lock actions remain dry-run by default through `Commands.executeConfirmedPowerActions: false`. This prevents accidental logout/suspend/reboot/poweroff during validation and keeps destructive execution behind explicit future approval.
28 + Temporary `XDG_CONFIG_HOME` named config was used; no live home symlink mutation.
31 + qs ipc -c nugu call nugu openPowerMenu
32 + qs ipc -c nugu call nugu powerMenuVisible
33 + qs ipc -c nugu call nugu requestPowerAction reboot
34 + qs ipc -c nugu call nugu pendingPowerAction
35 + qs ipc -c nugu call nugu confirmPowerAction
36 + qs ipc -c nugu call nugu lastPowerAction
37 + qs ipc -c nugu call nugu powerMenuVisible
47 + confirm=dry-run reboot
55 + pgrep -a systemctl | grep -E 'reboot|poweroff|suspend': empty
61 + INFO: Configuration Loaded
64 + No QML errors, binding loops, reference errors, or lingering `qs` process were observed.
68 + - `/tmp/nugu-qs-power-menu.png`
69 + - `/tmp/nugu-qs-power-confirm-reboot.png`
71 + Vision checks confirmed:
73 + - Nugu power menu shows `lock`, `sleep`, `out`, `reboot`, `off`.
74 + - Dry-run notice is visible and readable.
75 + - Reboot confirmation state shows `cancel` and `confirm reboot`.
76 + - Destructive/error styling is visible for reboot confirmation.
78 + ##
Still open before replacing `hyprshutdown` 80 + - Real keybind migration after Quickshell service is live/recoverable.
81 + - Decide with user when, if ever, `executeConfirmedPowerActions` may become true.
82 + - If enabled, verify logout/sleep/reboot/poweroff semantics carefully; destructive actions need explicit approval.
quickshell/nugu/Commands.qml Modified 12 12 property string lastClipboardPreview:
"" 13 13 property bool lastClipboardCopied:
false 14 14 property string lastPowerAction:
"" 15 + property bool executeConfirmedPowerActions:
false 16 17 function detached (args: var):
void {
17 18 runner.command
= args
63 64 lastPowerAction
= `dry-run ${action}
` 67 + function confirmedPower (action: string): string {
70 + if (
! executeConfirmedPowerActions
|| action
=== "lock" ) {
71 + if (action
=== "lock" ) lock()
72 + else dryRunPower(action)
73 + return lastPowerAction
76 + if (action
=== "sleep" ) detached([
"sh" ,
"-c" ,
"loginctl lock-session && systemctl suspend" ])
77 + else if (action
=== "logout" ) detached([
"hyprctl" ,
"dispatch" ,
"exit" ])
78 + else if (action
=== "reboot" ) detached([
"systemctl" ,
"reboot" ])
79 + else if (action
=== "poweroff" ) detached([
"systemctl" ,
"poweroff" ])
80 + else return "unknown" 82 + lastPowerAction
= action
83 + return lastPowerAction
66 86 Process {
id :
runner }
quickshell/nugu/PowerMenu.qml Added new file mode 100644 2 + import QtQuick.Layouts
4 + import Quickshell.Wayland
10 + required property QtObject theme
11 + required property QtObject commands
12 + property bool
open :
false 13 + property string
pendingAction :
"" 19 + anchors {
top :
true ;
left :
true ;
right :
true }
23 + color :
"transparent" 26 + layer :
WlrLayer .Overlay
27 + namespace :
"nugu-power-menu" 28 + keyboardFocus : root.open
? WlrKeyboardFocus .Exclusive
: WlrKeyboardFocus .None
31 + function show (): string {
37 + function close ():
void {
42 + function request (action: string): string {
43 + pendingAction
= action
45 + return pendingAction
48 + function confirm (): string {
49 + if (pendingAction.length
=== 0 )
return "none" 50 + const result
= commands.confirmedPower(pendingAction)
56 + function label (action: string): string {
57 + if (action
=== "poweroff" )
return "power off" 58 + if (action
=== "reboot" )
return "reboot" 59 + if (action
=== "logout" )
return "log out" 60 + if (action
=== "sleep" )
return "sleep" 61 + if (action
=== "lock" )
return "lock" 66 + anchors.fill: parent
67 + onClicked : root.close()
71 + anchors.top: parent.top
72 + anchors.horizontalCenter: parent.horizontalCenter
73 + width :
Math .
min (parent.width
- 32 ,
480 )
74 + height : parent.height
76 + color :
` ${theme.ui.backdrop}
f2` 78 + border.color: pendingAction
=== "reboot" || pendingAction
=== "poweroff" ? theme.error
: theme.ui.accent
81 + anchors.fill: parent
86 + Layout .fillWidth:
true 87 + text : pendingAction.length
=== 0 ? "Power" : `Confirm ${root.label(root.pendingAction)}
` 88 + color : pendingAction
=== "reboot" || pendingAction
=== "poweroff" ? theme.error
: theme.ui.important_global
89 + font.family:
"IBM Plex Sans" 92 + horizontalAlignment :
Text .AlignHCenter
96 + Layout .fillWidth:
true 97 + text : commands.executeConfirmedPowerActions
98 + ? "Confirmed action will execute." 99 + : "Confirmed non-lock actions are dry-run until parity approval." 100 + color : theme.ui.minor
101 + font.family:
"IBM Plex Mono" 103 + horizontalAlignment :
Text .AlignHCenter
104 + wrapMode :
Text .WordWrap
108 + Layout .fillWidth:
true 112 + visible : pendingAction.length
=== 0 114 + StatusItem {
theme : root.theme;
text :
" lock" ;
minWidth :
210 ;
onLeftClicked : root.request(
"lock" ) }
115 + StatusItem {
theme : root.theme;
text :
" sleep" ;
minWidth :
210 ;
muted :
true ;
onLeftClicked : root.request(
"sleep" ) }
116 + StatusItem {
theme : root.theme;
text :
" out" ;
minWidth :
210 ;
muted :
true ;
onLeftClicked : root.request(
"logout" ) }
117 + StatusItem {
theme : root.theme;
text :
" reboot" ;
minWidth :
210 ;
critical :
true ;
onLeftClicked : root.request(
"reboot" ) }
118 + StatusItem {
theme : root.theme;
text :
" off" ;
minWidth :
210 ;
critical :
true ;
onLeftClicked : root.request(
"poweroff" ) }
122 + Layout .fillWidth:
true 123 + visible : pendingAction.length
> 0 130 + onLeftClicked : root.pendingAction
= "" 135 + text :
`confirm ${root.label(root.pendingAction)}
` 137 + critical : root.pendingAction
=== "reboot" || root.pendingAction
=== "poweroff" 138 + warning : root.pendingAction
=== "sleep" || root.pendingAction
=== "logout" 139 + onLeftClicked : root.confirm()
147 + onActivated : root.close()
quickshell/nugu/README.md Modified 136 136 qs ipc -c nugu call nugu chooseClipboardIndex 0
137 137 qs ipc -c nugu call nugu closeClipboardPicker
140 + ## Phase 4D power confirmation IPC
142 + Phase 4D adds the future `CTRL+ALT+Delete` target. The menu has the same action
143 + set as the current power surfaces but makes session/destructive actions two-step.
144 + Confirmed non-lock actions remain dry-run until final parity approval.
147 + qs ipc -c nugu call nugu openPowerMenu
148 + qs ipc -c nugu call nugu requestPowerAction reboot
149 + qs ipc -c nugu call nugu pendingPowerAction
150 + qs ipc -c nugu call nugu confirmPowerAction
151 + qs ipc -c nugu call nugu lastPowerAction
152 + qs ipc -c nugu call nugu closePowerMenu
quickshell/nugu/shell.qml Modified 84 84 function clipboardPickerMatchCount (): int {
return clipboardPicker.matchCount() }
85 85 function clipboardPickerFirstPreview (): string {
return clipboardPicker.firstMatchPreview() }
86 86 function chooseClipboardIndex (index: int): string {
return clipboardPicker.chooseIndex(index) }
90 + function openPowerMenu (): string {
return powerMenu.show() }
91 + function closePowerMenu ():
void { powerMenu.close() }
92 + function powerMenuVisible (): bool {
return powerMenu.open }
93 + function requestPowerAction (action: string): string {
return powerMenu.request(action) }
94 + function pendingPowerAction (): string {
return powerMenu.pendingAction }
95 + function confirmPowerAction (): string {
return powerMenu.confirm() }
96 + function lastPowerAction (): string {
return commandBus.lastPowerAction }
110 120 commands: commandBus
126 + commands : commandBus
115 131 model :
Quickshell .screens