Switch to first empty tag

This commit is contained in:
Thomas Avé 2023-07-17 16:52:50 +02:00
parent 12e6b362d7
commit e9661f2446
1 changed files with 2 additions and 6 deletions

View File

@ -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)