Fix waybar config

This commit is contained in:
2026-01-13 15:12:30 +01:00
parent 7f21933475
commit 40911bce34
2 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
// vim: ft=json5
{{- $hasBattery := false -}}
{{ $hasBattery := false -}}
{{- if eq .chezmoi.os "linux" -}}
{{- if (glob "/sys/class/power_supply/BAT*") -}}
{{- $hasBattery = true -}}
@@ -17,10 +17,8 @@
"height": 32,
"modules-left": ["custom/launcher","sway/workspaces","cpu","memory","disk","sway/window"],
"modules-center": ["custom/media"],
"modules-right": ["custom/update_audio","sway/mode","custom/kernel",{{- if eq .chezmoi.os "linux" -}}"network"{{- else }} "custom/network"{{ end}},"pulseaudio","tray","clock",{{- if $hasBattery -}}
"battery",
{{- end -}}"custom/power"],
"modules-right": ["custom/update_audio","sway/mode","custom/kernel",{{- if eq .chezmoi.os "linux" -}}"network"{{- else }} "custom/network"{{ end}},"pulseaudio","tray","clock",{{- if $hasBattery -}}"battery",{{- end -}}"custom/power"],
"keyboard-state": {
"numlock": true,

View File

@@ -10,4 +10,4 @@
"exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}'",
"on-click": "playerctl play-pause",
"interval": 1,
},
}}