summaryrefslogtreecommitdiff
path: root/examples/vala
diff options
context:
space:
mode:
authorrRedLim <[email protected]>2024-12-20 02:21:09 +0300
committerGitHub <[email protected]>2024-12-20 00:21:09 +0100
commitd16c856074531b9fb867b8922be370bcfc749614 (patch)
tree08ee70023bf18a6dc39f312269c0a4e63ff0b7e0 /examples/vala
parent23083cdec69853bc8e480807a5f93b03df340183 (diff)
chore: simple-bar filter special workspaces (#168)
Diffstat (limited to 'examples/vala')
-rw-r--r--examples/vala/simple-bar/widget/Bar.vala8
1 files changed, 6 insertions, 2 deletions
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) {