diff options
Diffstat (limited to 'examples/lua/simple-bar/widget')
-rw-r--r-- | examples/lua/simple-bar/widget/Bar.lua | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/examples/lua/simple-bar/widget/Bar.lua b/examples/lua/simple-bar/widget/Bar.lua index e7bd4ff..5e62253 100644 --- a/examples/lua/simple-bar/widget/Bar.lua +++ b/examples/lua/simple-bar/widget/Bar.lua @@ -127,17 +127,19 @@ local function Workspaces() end) return map(wss, function(ws) - return Widget.Button({ - class_name = bind(hypr, "focused-workspace"):as(function(fw) - return fw == ws and "focused" or "" - end), - on_clicked = function() - ws:focus() - end, - label = bind(ws, "id"):as(function(v) - return type(v) == "number" and string.format("%.0f", v) or v - end), - }) + if !(ws.id >= -99 and ws.id <= -2) then -- filter out special workspaces + return Widget.Button({ + class_name = bind(hypr, "focused-workspace"):as(function(fw) + return fw == ws and "focused" or "" + end), + on_clicked = function() + ws:focus() + end, + label = bind(ws, "id"):as(function(v) + return type(v) == "number" and string.format("%.0f", v) or v + end), + }) + end end) end), }) |