Suggestion: add default for `--terminal`
It would reduce the amount of required configuration if there was a default value for
A suggestion is:
- if $TERMINAL is set, use "$TERMINAL -e"
- if 'foot' is in the path, use "foot"
- print error message and exit with error code: "Attempted to load desktop file with
--terminalwas passed and
$TERMINALis not set.
Many terminals support
-e to pass a command including:
rofi-sensible-terminal to solve the problem of finding a terminal to launch, but that seems like overkill and possibly error prone if you have multiple terminals installed. It's also no fun to maintain a constantly evolving list of terminals.
After switching from Alacritty to
foot, I still found that sometimes I had instances of Alacritty getting launched and I couldn't figure out where they were coming from. Later, I found that I had
--terminal "alacritty -e" embedded in a fuzzel-launching script.
fuzzel had defaulted to
$TERMINAL -e, I would have had one less place to update all my references to Alacritty.
I like the idea of defaulting to something. I'd rather avoid depending on
-e however, especially seeing how we've been preaching that applications shouldn't rely on terminals implementing
-e over at foot...
Printing an error message and exiting with an error code is obviously a step-up from current behavior.
Another fairly common pattern is to have a builtin list of "supported" terminals, and use the first available one. I guess this is similar to
I would prefer to use
$TERMINAL. I just don't like the idea of assming it understands
-e. But perhaps that is the best option available.
Deleting a branch is permanent. It CANNOT be undone. Continue?