awful.util.spawn*: Remove obsolete screen argument

Ever since commit 6b2e4352b (from 2010!), awesome.spawn() doesn't have a screen
argument anymore and the extra argument from util.spawn was just ignored. Fix
the code and the luadoc for these functions.

Thanks to blueyed for noticing this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-03-07 10:54:52 +01:00
parent 202567dc12
commit f19912900d
1 changed files with 4 additions and 6 deletions

View File

@ -72,22 +72,20 @@ end
--- Spawn a program. --- Spawn a program.
-- @param cmd The command. -- @param cmd The command.
-- @param sn Enable startup-notification. -- @param sn Enable startup-notification.
-- @param screen The screen where to spawn window.
-- @return The awesome.spawn return value. -- @return The awesome.spawn return value.
function util.spawn(cmd, sn, screen) function util.spawn(cmd, sn)
if cmd and cmd ~= "" then if cmd and cmd ~= "" then
if sn == nil then sn = true end if sn == nil then sn = true end
return capi.awesome.spawn(cmd, sn, screen or capi.mouse.screen) return capi.awesome.spawn(cmd, sn)
end end
end end
--- Spawn a program using the shell. --- Spawn a program using the shell.
-- @param cmd The command. -- @param cmd The command.
-- @param screen The screen where to run the command. function util.spawn_with_shell(cmd)
function util.spawn_with_shell(cmd, screen)
if cmd and cmd ~= "" then if cmd and cmd ~= "" then
cmd = { util.shell, "-c", cmd } cmd = { util.shell, "-c", cmd }
return capi.awesome.spawn(cmd, false, screen or capi.mouse.screen) return capi.awesome.spawn(cmd, false)
end end
end end