mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-15 07:44:01 -04:00
* powermenu: derive shortcuts and extra actions from one source The power menu matched keys with a switch that repeated the key hints getPowerActionData already returns, plus a second key list for release. Look the pressed key up against the hints of the visible actions instead, so every action with a hint gets its shortcut and the two cannot drift. Side effects: - Ctrl+letter no longer triggers actions. Only Ctrl+P was excluded before, so Ctrl+R still rebooted. Ctrl combinations are navigation. - U now triggers switch user when it is shown. Its hint already said U. - Releasing a letter with no visible action no longer cancels a hold. SessionService now owns the custom:N action ids as customPowerActions and extraPowerActions, which the power menu and the launcher both use. Actions resolve by index into that list instead of slicing the prefix. * powermenu: add actions that reboot into a chosen efi boot entry Settings → Power & Sleep gets a "Reboot to another OS" card that lists the firmware's active EFI entries through efibootmgr. Each saved entry becomes a "Reboot to <name>" action in the power menu and the launcher, bound to 1-9 in the order it was added. Picking one lists the entries again, and stops with a toast if the id no longer carries the saved label. Otherwise it sets BootNext through pkexec and reboots through SessionService, so custom reboot commands still apply. BootEntryService reports why entries are unavailable: not booted in UEFI mode, efibootmgr missing, or efibootmgr failing with its stderr. Saved entries stay listed in settings whatever the status, so a synced config on another machine can still remove them. efibootmgr parsing and the picker's filtering live in BootEntries.js, covered by tests/boot-entries.test.mjs. * powermenu: ignore special keys in action shortcuts