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:
@@ -29,6 +29,7 @@
|
||||
"format-window-separator": " ",
|
||||
"window-rewrite-default": "",
|
||||
"window-rewrite": {
|
||||
"class<brave-browser>": "",
|
||||
"class<kitty>": "",
|
||||
"class<foot>": "",
|
||||
"class<Alacritty>": "",
|
||||
@@ -94,8 +95,8 @@
|
||||
"format-plugged": "\uf1e6 {capacity}%",
|
||||
"format-icons": ["\uf244", "\uf243", "\uf242", "\uf241", "\uf240"],
|
||||
"states": {
|
||||
"warning": 85,
|
||||
"critical": 80
|
||||
"warning": 25,
|
||||
"critical": 15
|
||||
},
|
||||
"tooltip-format": "{timeTo}, {power:.1f}W"
|
||||
},
|
||||
|
||||
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