Offer only installed terminals in the terminal preference - #226
Open
kacperpaczos wants to merge 1 commit into
Open
Offer only installed terminals in the terminal preference#226kacperpaczos wants to merge 1 commit into
kacperpaczos wants to merge 1 commit into
Conversation
The preference listed every supported terminal, so a user could pick one that is not on the machine; the actions that open a terminal then quietly fell back to the first supported one they found, and the preference looked broken - "GNOME Console" selected, Konsole opens. The popup now lists only terminals that are installed (on PATH or as a flatpak), so what is shown is what will run; with none installed it shows the existing "no supported terminal" message instead.
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.
Closes #225
The terminal preference offered every supported terminal, installed or not, and picking an absent one was silently replaced at spawn time by the first supported terminal on the machine — "GNOME Console" selected, Konsole opens. The popup now lists only terminals that are actually present (a binary on PATH, or an installed flatpak), so the selection shown is the terminal that will really run; if none are installed it shows the existing "no supported terminal" message instead of an empty dropdown.
utils::get_installed_terminalsdoes the filtering with the same PATH/flatpak checksget_terminal_and_separator_argalready applies, so the two agree by construction. The spawn-time fallback is untouched — it still guards against a terminal being removed after it was chosen.Verified on a machine with Konsole, Kitty and Alacritty installed and
default-terminalset to "GNOME Console": before, the popup showed GNOME Console selected while Konsole opened; after, the popup shows Konsole (what actually runs) and offers only those three.