Repository navigation
Linux: Open terminal reaches the session's window on niri - #1156
Open
untypequicode wants to merge 1 commit into
Open
untypequicode wants to merge 1 commit into
untypequicode wants to merge 1 commit into
Conversation
… CHANGELOG Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What
On niri, "Open terminal" found no window to bring forward: niri is a Wayland compositor without the KWin door, and EWMH only reaches XWayland windows. This adds niri as a third way in
platform/linux_focus.rs.niri msg --json windowslists every window with its process ID, native Wayland ones included.session_window::choose_window(the one titled after the session's folder when a process has several).niri msg action focus-window --id <id>scrolls to it and switches to its workspace.The niri way is taken only when
NIRI_SOCKETis set in a Wayland session, and comes before the X11 way, which stays as a second try for XWayland windows. Nothing changes on other desktops.As with the other ways, the only values handed to a command are numbers we read ourselves (the window id from niri's own answer), passed as separate arguments, never through a shell.
Scope
Kept to the minimum: one file of Rust and the "Open terminal" list in
windows/README.md. An Unreleased entry is in the CHANGELOG.Tests
methods()cases for niri (native and XWayland, and a staleNIRI_SOCKEToutside Wayland).niri::pickon a sample ofniri msg --json windows: the folder's window wins, entries without a pid or with a bad id are skipped, garbage gives nothing.cargo test -p coucou linux_focus: 8 passed. The JSON shape was checked against niri 26.04.🤖 Generated with Claude Code