Change class for terminal apps

This commit is contained in:
Ksaper 2023-02-25 02:39:59 +02:00
parent 3c44c5c056
commit 47da489ba8
1 changed files with 8 additions and 1 deletions

View File

@ -152,7 +152,14 @@ local function app_widget(self, app)
local _self = self local _self = self
function widget:spawn() function widget:spawn()
if app.terminal == true then if app.terminal == true then
awful.spawn.with_shell(AWESOME_SENSIBLE_TERMINAL_PATH .. " -e " .. app.exec) local pid = awful.spawn.with_shell(AWESOME_SENSIBLE_TERMINAL_PATH .. " -e " .. app.exec)
local class = app.startup_wm_class or app.name
awful.spawn.with_shell(string.format(
[[xdotool search --sync --all --pid %s --name '.*' set_window --classname "%s" set_window --class "%s"]],
pid,
class,
class
))
else else
app:launch() app:launch()
end end