Biont / sway-launcher-desktop

TUI Application launcher with Desktop Entry support. Made for SwayWM, but runs anywhere
GNU General Public License v3.0
606 stars 28 forks source link

$TERM or $TERMINAL #44

Closed Kabouik closed 2 years ago

Kabouik commented 3 years ago

For TUI applications, the script defaults to $TERM -e, but am I wrong that $TERM is the convention for setting terminfo things like xterm-256-color and not the actual terminal emulator application? I think the latter is usually set with $TERMINAL instead.

See: https://linux.die.net/man/7/term

SirWrexes commented 2 years ago

Hi ! $TERMINAL should definitely be used instead. I came here for this exact reason with a use case where using $TERM just straight up doesn't work. I use KiTTY, and thus I have set TERMINAL=kitty. KiTTY itself sets TERM=xterm-kitty. I'm pretty I'll end up breaking things if I mess with the TERM value.

Biont commented 2 years ago

Huh, sorry for not reacting here for so long. This makes sense, yeah

SirWrexes commented 2 years ago

I have opened a pull request (yay no work to do !) since it's an easy and quick fix. I would suggest also implementing an error if $TERMINAL is not set, as it's more of a convention IIRC and might just be empty.

Kabouik commented 2 years ago

Thanks, glad that it was relevant!

SirWrexes commented 2 years ago

Sorry for the multiple push, I tend to forget editing the README when doing PRs. And sorry for the double push on the last one too, my code/markdown formater triggers on save and it changed a whole bunch of lines like it's no-one's business. :sweat_smile:

Biont commented 2 years ago

Thanks for the report and contribution!