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 <noreply@anthropic.com>
This commit is contained in:
Matthias Puchstein
2026-03-15 23:56:34 +01:00
parent 6e95012cab
commit 7c39de5d9a
2 changed files with 14 additions and 9 deletions

View File

@@ -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 }}

View File

@@ -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",