awful.tag: view{next,prev} take screen as argument

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-08-24 08:31:44 +02:00
parent 4b311371f1
commit e298353583
1 changed files with 8 additions and 5 deletions

View File

@ -216,7 +216,8 @@ end
-- @param i The relative index to see. -- @param i The relative index to see.
-- @param screen Optional screen number. -- @param screen Optional screen number.
function viewidx(i, screen) function viewidx(i, screen)
local tags = capi.screen[screen or capi.mouse.screen]:tags() local screen = scree or capi.mouse.screen
local tags = capi.screen[screen]:tags()
local showntags = {} local showntags = {}
for k, t in ipairs(tags) do for k, t in ipairs(tags) do
if not getproperty(t, "hide") then if not getproperty(t, "hide") then
@ -233,13 +234,15 @@ function viewidx(i, screen)
end end
--- View next tag. This is the same as tag.viewidx(1). --- View next tag. This is the same as tag.viewidx(1).
function viewnext() -- @param screen The screen number.
return viewidx(1) function viewnext(screen)
return viewidx(1, screen)
end end
--- View previous tag. This is the same a tag.viewidx(-1). --- View previous tag. This is the same a tag.viewidx(-1).
function viewprev() -- @param screen The screen number.
return viewidx(-1) function viewprev(screen)
return viewidx(-1, screen)
end end
--- View only a tag. --- View only a tag.