From d014f9c268bb55ea0b6f0e906a193ad12d32db38 Mon Sep 17 00:00:00 2001 From: Trey Blancher Date: Sun, 28 Jun 2026 13:35:06 -0400 Subject: [PATCH] Fixed workspace order in single-monitor mode --- workspaces.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workspaces.lua b/workspaces.lua index 35c19db..27c58fc 100644 --- a/workspaces.lua +++ b/workspaces.lua @@ -18,7 +18,9 @@ local function assign_workspaces() package.loaded["workspace_config"] = nil -- force reload in case it changed local ws_config = require("workspace_config") - for _, ws in ipairs(ws_config) do + -- Iterate in REVERSE to assign the most negative IDs to the first items, counteracting Waybar's low-to-high sorting! + for i = #ws_config, 1, -1 do + local ws = ws_config[i] local target_mon = has_dock and ws.monitor or "eDP-1" hl.workspace_rule({ workspace = "name:" .. ws.name, monitor = target_mon, persistent = true, default = true }) end