feat: add battery-watch daemon and notification urgency support
- new battery-watch daemon: warnt bei 25% und 15% per dunst-Notification - notify-waybar.sh schreibt jetzt auch Urgency-Level in /tmp - notif-status.sh: neues waybar-Skript mit urgency-CSS-Klasse - hyprland.conf: battery-watch als exec-once, clipboard-bind entfernt - config.jsonc: Brave-Icon hinzugefügt, Battery-Schwellen auf 25/15 korrigiert - generate.py: Font Awesome Brands ergänzt, transition:none für critical-blink - reload.sh: waybar-Start korrigiert (disown als eigene Zeile) - install.sh: startet dunst und battery-watch nach Theme-Load neu
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
if [ ! -f /tmp/waybar-notif ]; then
|
||||
printf '{"text":"","class":""}\n'
|
||||
exit 0
|
||||
fi
|
||||
text=$(cat /tmp/waybar-notif)
|
||||
urgency=$(cat /tmp/waybar-notif-urgency 2>/dev/null | tr '[:upper:]' '[:lower:]')
|
||||
urgency="${urgency:-normal}"
|
||||
icon=$''
|
||||
# Escape backslashes and quotes in text to keep JSON valid
|
||||
text=$(printf '%s' "$text" | sed 's/\\/\\\\/g; s/"/\\"/g')
|
||||
printf '{"text":"%s %s","class":"%s"}\n' "$icon" "$text" "$urgency"
|
||||
Reference in New Issue
Block a user