fix(niri): Super+Space switches keyboard layout (us/ar)#13
Merged
Conversation
Niri grabs key events for its own binds before xkbcommon's group-toggle action fires, so the xkb `grp:ctrl_space_toggle` option — which does switch layouts under X11/LeftWM — was a no-op in Niri. Super+Space did nothing. Add Niri's native `switch-layout "next"` action on Mod+Space (= Super+Space) and document the X11-vs-Niri difference at the xkb block. The X11 paths (home.keyboard, services.xserver.xkb) keep grp:ctrl_space_toggle untouched. Verified with `niri validate` (config is valid). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
In Niri, Super+Space did not change the writing language. The Niri config relied solely on the xkb option
grp:ctrl_space_toggle, but:grp:*_toggleoptions are a no-op under Niri (they do work under X11/LeftWM).Fix
Mod+Space { switch-layout "next"; }(Mod = Super) with a hotkey-overlay title.home.keyboard,services.xserver.xkb) keepgrp:ctrl_space_toggle— it genuinely works under LeftWM.Verification
nix evalof the toplevel drvPath — passes.niri validateon the renderedconfig.kdl— config is valid.🤖 Generated with Claude Code