Biont/sway-launcher-desktop

$TERM or $TERMINAL

Kabouik opened this issue · 6 comments

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

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

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

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.

Thanks, glad that it was relevant!

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. 😅

Biont commented

Thanks for the report and contribution!