diff --git a/awesome/keys.lua b/awesome/keys.lua index 1afc72b..c3f5181 100644 --- a/awesome/keys.lua +++ b/awesome/keys.lua @@ -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)