Run-in-terminal button for COMMAND selections; support ptyxis#3
Open
GaimsDevSoftware wants to merge 1 commit into
Open
Run-in-terminal button for COMMAND selections; support ptyxis#3GaimsDevSoftware wants to merge 1 commit into
GaimsDevSoftware wants to merge 1 commit into
Conversation
ContentType.COMMAND was defined and classified (e.g. shell-command-looking selections like `wpctl set-volume @DEFAULT_AUDIO_SINK@ 50%`) but no plugin registered for it, so the popup never offered a way to act on it. - plugins_repo/run_in_terminal.py: new plugin registering a "Run in terminal" button (icon utilities-terminal-symbolic, priority 30) for ContentType.COMMAND only. The handler defers to the existing actions.run_in_terminal backend (terminal discovery, confirmation dialog gated on terminal_confirm_run, echo-wrap, keep-open via terminal_keep_open, safe argv spawn). - actions.py: add ptyxis as the first entry in _TERMINALS. Ptyxis is the default terminal on Fedora 41+ / modern GNOME and uses the same `-- bash -c <cmd>` convention as gnome-terminal. Without it _find_terminal() returned None on a stock GNOME box where ptyxis is the only terminal installed, so run_in_terminal silently no-op'd. Live-tested on Fedora 44 GNOME/Wayland: a real ptyxis window opens, the confirmation dialog appears, and the command runs after pressing Run.
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.
Adds the missing Run in terminal popup button for
ContentType.COMMANDselections, and teaches the terminal launcher about ptyxis.
Why
ContentType.COMMANDwas already defined and classified (e.g. selections likewpctl set-volume @DEFAULT_AUDIO_SINK@ 50%), but no plugin registered for it, sothe popup never offered a way to act on a command-looking selection.
Changes
plugins_repo/run_in_terminal.py(new): registers a "Run in terminal"button (icon
utilities-terminal-symbolic, priority 30) forContentType.COMMANDonly. The handler defers to the existingactions.run_in_terminalbackend — terminal discovery, the confirmationdialog gated on
terminal_confirm_run, echo-wrap, keep-open viaterminal_keep_open, and the safe argv spawn.actions.py: addptyxisas the first entry in_TERMINALS. Ptyxis isthe default terminal on Fedora 41+ / modern GNOME and uses the same
-- bash -c <cmd>convention as gnome-terminal. Without it_find_terminal()returned
Noneon a stock GNOME box where ptyxis is the only terminalinstalled, so
run_in_terminalsilently no-op'd.Testing
Live-tested on Fedora 44 GNOME/Wayland: a real ptyxis window opens, the
confirmation dialog appears (
terminal_confirm_rundefaults true), and thecommand runs after pressing Run.