Switch to first empty tag
This commit is contained in:
parent
12e6b362d7
commit
e9661f2446
|
@ -15,15 +15,11 @@ local keys = {}
|
|||
local function get_first_nonempty_tag()
|
||||
local screen = awful.screen.focused()
|
||||
local tags = screen.tags
|
||||
local first_empty = nil
|
||||
for _, t in ipairs(tags) do
|
||||
if #t:clients() > 0 then
|
||||
first_empty = nil
|
||||
elseif first_empty == nil then
|
||||
first_empty = t
|
||||
if #t:clients() == 0 then
|
||||
return t
|
||||
end
|
||||
end
|
||||
return first_empty
|
||||
end
|
||||
|
||||
local focus_bydirection = function(direction)
|
||||
|
|
Loading…
Reference in New Issue