]> git.rmz.io Git - dotfiles.git/commitdiff
awesome: set wm class for apps opened in wetzterm
authorSamir Benmendil <me@rmz.io>
Sat, 6 Apr 2024 22:41:25 +0000 (23:41 +0100)
committerSamir Benmendil <me@rmz.io>
Sat, 6 Apr 2024 22:41:25 +0000 (23:41 +0100)
awesome/utils.lua

index 7f1d4b3e77d23dff896236d795b982ff3afda1c3..13856335ad3c7acbc919e44b8ab88023260ebf45 100644 (file)
@@ -16,12 +16,19 @@ end
 local function terminal_cmd(prg, name)
     local join = require("gears.table").join
     local term_cmd = {terminal}
-    if name then
-        if terminal:match("rxvt") then
+    if terminal:match("rxvt") then
+        if name then
             term_cmd = join(term_cmd, {"-name", name})
         end
+    elseif terminal:match("wezterm") then
+        term_cmd = join(term_cmd, {"start"})
+        if name then
+            term_cmd = join(term_cmd, {"--class", name})
+        end
+    else
+        term_cmd = join(term_cmd, {"-e"})
     end
-    return join(term_cmd, {"-e", prg})
+    return join(term_cmd, {prg})
 end
 
 function utils.spawn_terminal(prg, cprop, cb)