locker: watch xkb_config for live layout updates and show active layout label - #439
Open
utrumo wants to merge 1 commit into
Open
locker: watch xkb_config for live layout updates and show active layout label#439utrumo wants to merge 1 commit into
utrumo wants to merge 1 commit into
Conversation
11 tasks
Member
|
The PR template is mandatory |
Author
|
@jackpot51, I fixed the PR description |
utrumo
force-pushed
the
fix/locker-xkb-watch
branch
from
May 21, 2026 13:42
a19ed5d to
4f22449
Compare
- Subscribe to cosmic_config changes for com.system76.CosmicComp so active_layouts is refreshed whenever xkb_config changes at runtime (previously the locker cached active_layouts at startup and never updated, leaving the dropdown checkmark pointing at a stale layout). - Extract refresh_active_layouts() from update_user_data() and reuse it from the new XkbConfigChanged handler. - Show the active layout code (EN/RU/...) next to the keyboard icon on the lock screen so users don't have to open the dropdown to see which layout is currently active.
utrumo
force-pushed
the
fix/locker-xkb-watch
branch
from
May 22, 2026 22:53
4f22449 to
aaf3da3
Compare
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.
Summary
com.system76.CosmicCompconfig changes so the lockerrefreshes
active_layoutswheneverxkb_configis modified at runtime.Previously the locker cached layouts at startup and never updated,
leaving the dropdown checkmark pointing at a stale layout after any
switch.
the lock screen so users can see which layout is active without opening
the dropdown.
This PR stands on its own — any tool that changes
xkb_config(Settings →Keyboard,
busctl, etc.) will trigger the locker UI refresh. The companionpop-os/cosmic-comp#2296 additionally enables
Super+Spaceto switchlayouts under session lock, completing the user-facing flow.
Test plan
xkb_configat runtime (e.g. via Settings → Keyboard → Input Sources,or directly through cosmic-config). Lock the screen — the dropdown
checkmark and the layout label both reflect the new layout.
(EN/RU/…) renders next to the keyboard icon.
xkb_config.layout— only the icon renders, no label, no crash.Super+Spaceon the lockscreen to switch layouts — the dropdown checkmark and the layout label
update live.