X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/bcf13301fce23ff122f3d5b6bbb3688bf60c944b..b47ffe60e244c9165f40371736079320ea2d848b:/awesome/utils.lua diff --git a/awesome/utils.lua b/awesome/utils.lua index 993d95d..1385633 100644 --- a/awesome/utils.lua +++ b/awesome/utils.lua @@ -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) @@ -92,7 +99,7 @@ function utils.run_once(prg,arg_string,pname,screen) end function utils.get_default_sink() - local f = io.popen('ponymix defaults --short') + local f = io.popen('pactl get-default-sink') line = f:read('*l') f:close() return string.match(line, "^sink%s*%d*%s*(.-)%s")