Skip to content

finders/desktop: support Terminal=true applications - #88

Draft
TheTrueWhiteOwl wants to merge 1 commit into
hyprwm:mainfrom
TheTrueWhiteOwl:terminal-exec
Draft

finders/desktop: support Terminal=true applications#88
TheTrueWhiteOwl wants to merge 1 commit into
hyprwm:mainfrom
TheTrueWhiteOwl:terminal-exec

Conversation

@TheTrueWhiteOwl

@TheTrueWhiteOwl TheTrueWhiteOwl commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

This adds a new dependency, namely to xdg-terminal-exec. I decided to use this script as a dependency, since, despite it still only being a proposal, there is already quite widespread use of it (e.g. wofi, glib).

Since this is better than the current total lack of support it seems reasonable and it also avoids any issues caused by implementing a default list, which by its very nature will never be fully complete, or will go out of date, and will just lead to users requesting their terminal be added to the default list.

@vaxerski

vaxerski commented Dec 9, 2025

Copy link
Copy Markdown
Member

I don't like it. Why not get the default terminal manually?

@TheTrueWhiteOwl

TheTrueWhiteOwl commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

Yeah I did this as the quick fix, lazily, because I already had xdg-terminal-exec installed abd I had a couple of terminal apps that I really wanted to work.

We could implement a fixed list of terminal emulators that we check (kitty, alacritty, wezterm, foot, termite, gnome-terminal, weston-terminal, konsole) check for the existence of a TERMINAL environment variable to indicate the default terminal, and maybe only after fall back to xdg-terminal-exec?

Or maybe even a configuration option that takes priority over all mentioned optioms above?

I am already using this patch for my use case, so I won't implement anything until we make it clear which of the above mentioned proposals would be desirable.

@vaxerski

Copy link
Copy Markdown
Member

a config option, then env, then fixed is ok to me

@UncleJ4ck

Copy link
Copy Markdown

Hey @TheTrueWhiteOwl, took a shot at finishing this off.

Since #133 merged the finders:desktop_terminal config option after you opened this, I built the rest of what vaxry signed off on (config, then $TERMINAL, then a fallback list of common terminals) on top of current main:

https://github.com/UncleJ4ck/hyprlauncher/tree/terminal-exec-fallback

It maps each terminal to the right exec flag (kitty/foot positional, gnome-terminal --, wezterm start --, the rest -e), and when nothing is configured it falls through $TERMINAL then the first installed terminal. Tested live: a Terminal=true entry (btop) opens in kitty with nothing set, where before it silently did nothing (#145).

Merge it into your branch if you want it, or just grab the commit, whatever's easiest.

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.

3 participants