Repository navigation
powermenu: reboot into a chosen EFI boot entry - #3568
Merged
bbedward merged 3 commits intoSep 27, 2026
Merged
Conversation
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.
matthewyjiang
marked this pull request as draft
September 25, 2026 09:15
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.
matthewyjiang
force-pushed
the
feat/reboot-to-boot-entry
branch
from
September 25, 2026 09:31
939c5f5 to
384c80f
Compare
matthewyjiang
marked this pull request as ready for review
September 25, 2026 09:36
Member
|
/claude review |
Contributor
Claude reviewOne bug to fix before merge. The new power menu key mapping lets special keys fire actions.
|
Member
|
/claude review |
Contributor
Claude reviewNo issues found. The special-key fix from the last review is in: |
6 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
An easy way for dual boaters to configure a "reboot into chosen os" power menu entry. requires
efibootmgr.On a UEFI machine with more than one OS, the power menu can now reboot straight into another one. The shell sets the firmware's one-time
BootNextentry, so the boot after that follows the normal boot order.efibootmgrand leaves out the OS that is running.1to9pick entries in the order you added them.pkexec efibootmgr --bootnext XXXXand reboots throughSessionService.reboot(), so custom reboot commands still apply.BootNextneeds root, so a polkit password prompt opens each time you pick an entry. Users who want to skip it can add the polkit rule from the docs PR (DankLinux-Docs#150, "Skipping the password"). The rule allows onlyefibootmgr --bootnext XXXXfrom an active local session.efibootmgrcan't list the entries, the card says why: the system didn't boot in UEFI mode,efibootmgris missing, orefibootmgrfailed with the error it printed. Saved entries stay in the list either way. If you sync your config to a machine without them, you can still remove them there.Docs: duxlabs-dev/dux-docs#150
Structure
There are two commits.
powermenu: derive shortcuts and extra actions from one sourcePower menu shortcuts now come from the key hint each action already shows, so boot entries get
1to9without key handling of their own.SessionServicealso keeps the list of actions added in settings, which the power menu and the launcher both read.It also fixes three shortcut bugs:
Udid nothing. The menu shows U as the hint for Switch user, but no key handler matched it. It now triggers Switch user when the menu shows it.powermenu: add actions that reboot into a chosen efi boot entryThe feature itself.
BootEntryServicelists the entries, checks them, and setsBootNext.Services/BootEntries.jsholds the parser forefibootmgroutput and the picker's filter as pure functions.Local testing
BootNextand restarted into that OS.make lint-qml: passes for all three entrypoints after regenerating the local Quickshell tooling config.node --test quickshell/tests/*.test.mjs: 194 pass. That includes the singleton cycle check and the newboot-entries.test.mjs.boot-entries.test.mjsparsesefibootmgroutput in the old format and in the tab-separated format of version 18. It also checks that the picker skips the running and saved entries and appends the id to duplicate labels.Type of change
Related issues
Screenshots / video
Settings → Power & sleep, with Windows Boot Manager added:
Power menu with the new reboot action and its
1shortcut:Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis clean. Not applicable: this PR has no Go changes.make lint-qmlwith no new warningsAI disclosure
AI assistance was used to create this PR.