fix: Waybar-Modul ausblenden statt "?" wenn Headset nicht erreichbar

Leerer text-Wert lässt Waybar das Modul automatisch verstecken.
Cache-TTL zurück auf 300s.
This commit is contained in:
nevaforget 2026-03-28 01:35:56 +01:00
parent 25eacfc02d
commit 46978af7b8

View File

@ -4,8 +4,8 @@
CACHE="/tmp/corsairctl-waybar.json" CACHE="/tmp/corsairctl-waybar.json"
LOCK="/tmp/corsairctl-waybar.lock" LOCK="/tmp/corsairctl-waybar.lock"
MAX_AGE=10 MAX_AGE=300
FALLBACK='{"text":"󰋋 ?","tooltip":"HS80: nicht erreichbar","class":"offline","percentage":0}' FALLBACK='{"text":"","tooltip":"","class":"offline","percentage":0}'
# Cache frisch genug? Direkt ausgeben. # Cache frisch genug? Direkt ausgeben.
if [[ -f "$CACHE" ]] && [[ -s "$CACHE" ]]; then if [[ -f "$CACHE" ]] && [[ -s "$CACHE" ]]; then