Feature request: Add -e option to choose program run in foot window
xterm has an
-e option that allows the user to change the program run in the terminal window, from the manual:
-e program [ arguments ... ]
This option specifies the program (and its command line arguments) to be run in the xterm window. It also sets the window title and icon name to be the basename of the program being executed if neither -T nor -n are given on the command line.
NOTE: This must be the last option on the command line.
My specific use case is
j4-dmenu-desktop which uses the
-e option to launch programs in the terminal passed by the
The biggest problem with
-e isn't that some terminals don't support it, it's that even the ones that do support it aren't compatible with each other.
Some programs have started using
$TERMINAL) as a way to specify how to start a command in the user's preferred terminal.
I think a better thing to do in this case would be to petition the j4-dmenu developers to support something like
$TERMCMD and in the meantime use a wrapper script like e.g. this. Blindly using
-e with an arbitrary terminal is pretty much broken and is never going to be completely portable.
There seems to be a semi-related PR already open on the j4-dmenu-desktop repo.
Other duplicate issues:
Do you know which programs support TERMCMD? I would be interested in adding support to j4-menu-desktop and it would be useful to have some prior art to justify its inclusion.
Do you know which programs support TERMCMD?
I only know of ranger and sxmo.
I'm having second thoughts about recommending the use of
$TERMCMD though. I just looked at the ranger docs and it seems to suggest that
$TERMCMD is just for specifying the user's preferred terminal and they still blindly pass
-e to it. I guess I didn't notice this because I use a wrapper script that strips the
I'm starting to think maybe it would be a good idea for foot to just parse
-e as a no-op. I don't think there's any point in reserving it for other purposes, since far too many apps already make assumptions about its meaning. This still wouldn't solve the problem in general, but it'd make foot compatible with a few more launchers and any future questions about
foot -e could then be directed to the man page.
The existing PR on the j4-dmenu-desktop repo also seems like a reasonable solution, although there hasn't been any activity there in a while.
I'm starting to think maybe it would be a good idea for foot to just parse -e as a no-op
Well, this has been discussed since the beginning. I guess it might be easier to just go ahead and add it, instead of having to close the same feature request again and again (no offense).
Let me put it this way; I'll probably merge a PR, should someone post it ;)
Deleting a branch is permanent. It CANNOT be undone. Continue?