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 function get_first_nonempty_tag()
|
||||||
local screen = awful.screen.focused()
|
local screen = awful.screen.focused()
|
||||||
local tags = screen.tags
|
local tags = screen.tags
|
||||||
local first_empty = nil
|
|
||||||
for _, t in ipairs(tags) do
|
for _, t in ipairs(tags) do
|
||||||
if #t:clients() > 0 then
|
if #t:clients() == 0 then
|
||||||
first_empty = nil
|
return t
|
||||||
elseif first_empty == nil then
|
|
||||||
first_empty = t
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return first_empty
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local focus_bydirection = function(direction)
|
local focus_bydirection = function(direction)
|
||||||
|
|
Loading…
Reference in New Issue