From d16c856074531b9fb867b8922be370bcfc749614 Mon Sep 17 00:00:00 2001 From: rRedLim <82714753+rRedLim@users.noreply.github.com> Date: Fri, 20 Dec 2024 02:21:09 +0300 Subject: chore: simple-bar filter special workspaces (#168) --- examples/vala/simple-bar/widget/Bar.vala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/vala/simple-bar') diff --git a/examples/vala/simple-bar/widget/Bar.vala b/examples/vala/simple-bar/widget/Bar.vala index ba9f06c..8913c95 100644 --- a/examples/vala/simple-bar/widget/Bar.vala +++ b/examples/vala/simple-bar/widget/Bar.vala @@ -10,8 +10,12 @@ class Workspaces : Gtk.Box { foreach (var child in get_children()) child.destroy(); - foreach (var ws in hypr.workspaces) - add(button(ws)); + foreach (var ws in hypr.workspaces) { + // filter out special workspaces + if (!(ws.id >= -99 && ws.id <= -2)) { + add(button(ws)); + } + } } Gtk.Button button(AstalHyprland.Workspace ws) { -- cgit v1.2.3