Skip to content

Run-in-terminal button for COMMAND selections; support ptyxis#3

Open
GaimsDevSoftware wants to merge 1 commit into
mainfrom
feature/run-in-terminal-ptyxis
Open

Run-in-terminal button for COMMAND selections; support ptyxis#3
GaimsDevSoftware wants to merge 1 commit into
mainfrom
feature/run-in-terminal-ptyxis

Conversation

@GaimsDevSoftware

Copy link
Copy Markdown
Owner

Adds the missing Run in terminal popup button for ContentType.COMMAND
selections, and teaches the terminal launcher about ptyxis.

Why

ContentType.COMMAND was already defined and classified (e.g. 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 a command-looking selection.

Changes

  • plugins_repo/run_in_terminal.py (new): registers 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, the confirmation
    dialog gated on terminal_confirm_run, echo-wrap, keep-open via
    terminal_keep_open, and the 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.

Testing

Live-tested on Fedora 44 GNOME/Wayland: a real ptyxis window opens, the
confirmation dialog appears (terminal_confirm_run defaults true), and the
command runs after pressing Run.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant