From: Samir Benmendil Date: Sun, 12 Mar 2017 23:08:15 +0000 (+0000) Subject: awesome: replace awful.util.spawn with awful.spawn X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/d37a8a2c7275a2b419d489811fa0f5c900a2f122?ds=inline awesome: replace awful.util.spawn with awful.spawn --- diff --git a/awesome/bindings.lua b/awesome/bindings.lua index a482d36..16d579a 100644 --- a/awesome/bindings.lua +++ b/awesome/bindings.lua @@ -121,25 +121,25 @@ globalkeys = awful.util.table.join(globalkeys, -- Applications {{{2 -- Ksnapshot - awful.key({ }, "F13", function () awful.util.spawn("ksnapshot") end), - awful.key({ }, "Print", function () awful.util.spawn("ksnapshot") end), + awful.key({ }, "F13", function () awful.spawn("ksnapshot") end), + awful.key({ }, "Print", function () awful.spawn("ksnapshot") end), -- ranger - awful.key({ modkey }, "r", function () awful.util.spawn(terminal .. " -e ranger") end), + awful.key({ modkey }, "r", function () awful.spawn(terminal .. " -e ranger") end), -- Volume - awful.key({ }, "XF86AudioMute", function () awful.util.spawn("ponymix toggle") end, + awful.key({ }, "XF86AudioMute", function () awful.spawn("ponymix toggle") end, {description = "toggle mute", group = "volume"}), - awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("ponymix decrease 5") end, + awful.key({ }, "XF86AudioLowerVolume", function () awful.spawn("ponymix decrease 5") end, {description = "decrease volume", group = "volume"}), - awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("ponymix increase 5") end, + awful.key({ }, "XF86AudioRaiseVolume", function () awful.spawn("ponymix increase 5") end, {description = "increase volume", group = "volume"}), - awful.key({ modkey }, "F10", function () awful.util.spawn("ponymix toggle") end, + awful.key({ modkey }, "F10", function () awful.spawn("ponymix toggle") end, {description = "toggle mute", group = "volume"}), - awful.key({ modkey }, "F11", function () awful.util.spawn("ponymix decrease 5") end, + awful.key({ modkey }, "F11", function () awful.spawn("ponymix decrease 5") end, {description = "decrease volume", group = "volume"}), - awful.key({ modkey }, "F12", function () awful.util.spawn("ponymix increase 5") end, + awful.key({ modkey }, "F12", function () awful.spawn("ponymix increase 5") end, {description = "increase volume", group = "volume"}), -- Lock - awful.key({ modkey, "Control" }, "Escape", function () awful.util.spawn("xautolock -locknow") end), + awful.key({ modkey, "Control" }, "Escape", function () awful.spawn("xautolock -locknow") end), -- VimWiki awful.key({ modkey }, "i", function () awful.spawn(terminal.." -name vimwiki -e vim -c 'call vimwiki#base#goto_index(v:count1)'") diff --git a/awesome/utils.lua b/awesome/utils.lua index 0f12be1..070cb3e 100644 --- a/awesome/utils.lua +++ b/awesome/utils.lua @@ -47,7 +47,7 @@ function utils.run_or_kill(prg, cprop, screen) end end end - awful.util.spawn_with_shell(prg, screen) + awful.spawn.with_shell(prg, screen) end -- http://awesome.naquadah.org/wiki/Autostart#Simple_way @@ -61,9 +61,9 @@ function utils.run_once(prg,arg_string,pname,screen) end if not arg_string then - awful.util.spawn_with_shell("pgrep -f -u $USER -x '" .. pname .. "' || (" .. prg .. ")",screen) + awful.spawn.with_shell("pgrep -f -u $USER -x '" .. pname .. "' || (" .. prg .. ")",screen) else - awful.util.spawn_with_shell("pgrep -f -u $USER -x '" .. pname .. " ".. arg_string .."' || (" .. prg .. " " .. arg_string .. ")",screen) + awful.spawn.with_shell("pgrep -f -u $USER -x '" .. pname .. " ".. arg_string .."' || (" .. prg .. " " .. arg_string .. ")",screen) end end