From 7c39de5d9a787966199843daf8ec1caf388be5ed Mon Sep 17 00:00:00 2001 From: Matthias Puchstein Date: Sun, 15 Mar 2026 23:56:34 +0100 Subject: [PATCH] hypr,waybar: fix workspace visibility and tag-gate steam/spotify Remove persistent:true from named workspaces so they only appear in waybar when occupied. Gate steam on cs2 tag and spotify on entertainment tag. Fix waybar to prefer hyprland/workspaces over niri/workspaces when both tags are present. Co-Authored-By: Claude Sonnet 4.6 --- .../hypr/hyprland.d/20-workspaces.conf.tmpl | 17 +++++++++++------ dot_config/waybar/config.tmpl | 6 +++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/dot_config/hypr/hyprland.d/20-workspaces.conf.tmpl b/dot_config/hypr/hyprland.d/20-workspaces.conf.tmpl index b426683..0cf4c59 100644 --- a/dot_config/hypr/hyprland.d/20-workspaces.conf.tmpl +++ b/dot_config/hypr/hyprland.d/20-workspaces.conf.tmpl @@ -1,13 +1,18 @@ +{{- $tags := .chezmoi.config.data.tags -}} ## ========== Special Workspaces ========== workspace = special:passwordmgr, on-created-empty:uwsm app -- bitwarden-desktop ## ========== Named Workspaces (IDs 1-6, sorted before numbered) ========== -workspace = 1, defaultName:mail, persistent:true -workspace = 2, defaultName:comms, monitor:DP-2, layout:scrolling, layoutopt:direction:down, persistent:true -workspace = 3, defaultName:element, monitor:DP-2, layout:scrolling, layoutopt:direction:down, persistent:true -workspace = 4, defaultName:joplin, persistent:true -workspace = 5, defaultName:steam, layout:scrolling, persistent:true -workspace = 6, defaultName:spotify, monitor:DP-2, layout:monocle, persistent:true, on-created-empty:uwsm app -- spotify-launcher +workspace = 1, defaultName:mail +workspace = 2, defaultName:comms, monitor:DP-2, layout:scrolling, layoutopt:direction:down +workspace = 3, defaultName:element, monitor:DP-2, layout:scrolling, layoutopt:direction:down +workspace = 4, defaultName:joplin +{{- if index $tags "cs2" }} +workspace = 5, defaultName:steam, layout:scrolling +{{- end }} +{{- if index $tags "entertainment" }} +workspace = 6, defaultName:spotify, monitor:DP-2, layout:monocle, on-created-empty:uwsm app -- spotify-launcher +{{- end }} ## ========== Monitor Workspaces ========== {{- range $monitor := .monitors }} diff --git a/dot_config/waybar/config.tmpl b/dot_config/waybar/config.tmpl index c97562a..1892519 100644 --- a/dot_config/waybar/config.tmpl +++ b/dot_config/waybar/config.tmpl @@ -8,10 +8,10 @@ {{- end -}} {{- end -}} {{- $workspace_module := "" -}} -{{- if $tags.niri -}} - {{- $workspace_module = "niri/workspaces" -}} -{{- else if $tags.hyprland -}} +{{- if $tags.hyprland -}} {{- $workspace_module = "hyprland/workspaces" -}} +{{- else if $tags.niri -}} + {{- $workspace_module = "niri/workspaces" -}} {{- end -}} { "layer": "top",