docs: Waybar-Integrations-Beispiel mit Config und Styling

This commit is contained in:
nevaforget 2026-03-27 23:15:13 +01:00
parent a9d526023d
commit 87e4566315

60
docs/waybar-example.md Normal file
View File

@ -0,0 +1,60 @@
# Waybar-Integration
## Modul-Konfiguration (`~/.config/waybar/config`)
```json
"custom/headset": {
"exec": "corsairctl json",
"return-type": "json",
"interval": 30,
"format": "{}",
"on-click": "corsairctl sidetone 0",
"on-click-right": "corsairctl sidetone 10"
}
```
## Styling (`~/.config/waybar/style.css`)
```css
#custom-headset {
padding: 0 8px;
}
#custom-headset.charging {
color: #a6e3a1;
}
#custom-headset.normal {
color: #cdd6f4;
}
#custom-headset.warning {
color: #f9e2af;
}
#custom-headset.low,
#custom-headset.critical {
color: #f38ba8;
}
#custom-headset.offline {
color: #6c7086;
}
```
## JSON-Output Beispiel
```json
{"text": "󰋋 64%", "tooltip": "HS80: 64% — Charging", "class": "charging", "percentage": 64}
```
## CSS-Klassen
| Klasse | Bedingung |
|------------|--------------------------------|
| `charging` | Lädt oder voll geladen |
| `normal` | Entladen, > 30% |
| `warning` | Entladen, 16-30% |
| `critical` | Entladen, ≤ 15% |
| `low` | Gerät meldet "Low" |
| `offline` | Headset ausgeschaltet/getrennt |