From 05896c56ddee97835f546c32f5290a476901cf3c Mon Sep 17 00:00:00 2001 From: anakha Date: Thu, 10 Jun 2021 10:36:59 -0400 Subject: [PATCH] refactor --- init.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 8ee6e86..c5944bc 100644 --- a/init.lua +++ b/init.lua @@ -34,16 +34,16 @@ local function region_tablist() end --+ focused client's region - for _, tc in ipairs(screen[1].tiled_clients) do - if not (tc.floating or tc.immobilized) then - if regions[active_region].x <= tc.x + tc.width + tc.border_width * 2 and - tc.x <= regions[active_region].x + regions[active_region].width and - regions[active_region].y <= tc.y + tc.height + tc.border_width * 2 and - tc.y <= regions[active_region].y + regions[active_region].height - then - tablist[#tablist + 1] = tc - end - end + for _, tc in ipairs(screen[focused_screen].tiled_clients) do + if not (tc.floating or tc.immobilized) then + if regions[active_region].x <= tc.x + tc.width + tc.border_width * 2 and + tc.x <= regions[active_region].x + regions[active_region].width and + regions[active_region].y <= tc.y + tc.height + tc.border_width * 2 and + tc.y <= regions[active_region].y + regions[active_region].height + then + tablist[#tablist + 1] = tc + end + end end --+ tablist inside the active region