From 87e45663155f7a9695567f8c006b9b5acbb43141 Mon Sep 17 00:00:00 2001 From: nevaforget Date: Fri, 27 Mar 2026 23:15:13 +0100 Subject: [PATCH] docs: Waybar-Integrations-Beispiel mit Config und Styling --- docs/waybar-example.md | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/waybar-example.md diff --git a/docs/waybar-example.md b/docs/waybar-example.md new file mode 100644 index 0000000..4971628 --- /dev/null +++ b/docs/waybar-example.md @@ -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 |