e84a2d888a
- 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
13 lines
440 B
Bash
Executable File
13 lines
440 B
Bash
Executable File
#!/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"
|