diff --git a/lib/menubar/init.lua b/lib/menubar/init.lua index 53dd43a7b..f9aea0999 100644 --- a/lib/menubar/init.lua +++ b/lib/menubar/init.lua @@ -386,8 +386,8 @@ local function prompt_keypressed_callback(mod, key, comm) current_item = #shownitems if mod.Mod1 then -- add a terminal to the cmdline - shownitems[current_item].cmdline = menubar.utils.terminal - .. " -e " .. shownitems[current_item].cmdline + shownitems[current_item].cmdline = menubar.utils.terminal .. ' ' .. + menubar.utils.terminal_execute_option .. ' ' .. shownitems[current_item].cmdline end end return perform_action(shownitems[current_item]) diff --git a/lib/menubar/utils.lua b/lib/menubar/utils.lua index ac7277fbd..134afc650 100644 --- a/lib/menubar/utils.lua +++ b/lib/menubar/utils.lua @@ -35,9 +35,9 @@ local utils = {} utils.terminal = 'xterm' --- Terminal argument which indicates the execution of command --- Usually something like ' -e ', ' -x ', ' -- ' +-- Usually something like '-e', '-x', '--' -- @tfield string menubar.utils.terminal_execute_option -utils.terminal_execute_option = ' -e ' +utils.terminal_execute_option = '-e' --- The default icon for applications that don't provide any icon in -- their .desktop files. @@ -404,7 +404,7 @@ function utils.parse_desktop_file(file) cmdline = cmdline:gsub('%%i', '') end if program.Terminal == true then - cmdline = utils.terminal .. utils.terminal_execute_option .. cmdline + cmdline = utils.terminal .. ' ' .. utils.terminal_execute_option .. ' ' .. cmdline end program.cmdline = cmdline end