Open ThanosApostolou opened 6 years ago
@Elv13 you were right that having hardcoded terminal options was bad. Tell me what you think about my suggestion.
menubar.utils.terminal_execute_option
Sounds good to me.. maybe this should be a printf pattern though, i.e. -e "%s"
?
Output of
awesome --version
:How to reproduce the issue:
Menubar cannot launch applications which have
Terminal=true
when it's used with xfce4-terminal, mate-terminal, gnome-terminal, termite. The problematic line is https://github.com/awesomeWM/awesome/blob/68e4dd430f3c5a356afbd3d0cf4b94ac2bf64f4f/lib/menubar/utils.lua#L402 which takes for granted that terminals use the-e
option to execute a command. However, in most terminals the command needs to be wrapped in quotes or even better it's preferable to use the-x
option which passes all the rest arguments into the command. If I try to wrap the cmdline with quotes like this:then xfce4-terminal, mate-terminal, gnome-terminal and termite work but it breaks it for applications like lxterminal, st, urxvt.
Actual result:
Menubar only works with a few terminal options
Expected result: Menubar should work with many terminal options
After a lot of thinking, I believe that the best solution is to add a FIeld at menubar.utils Module like menubar.utils.terminal_execute_option which will be set to
-e
by default but users will be able to change it in-x
and then menubar will execute the terminal argument according to this option. What do you think?