Update .config/DankMaterialShell/settings.json

Update .config/niri/config.kdl
Update .config/niri/dms/alttab.kdl
Update .config/niri/dms/layout.kdl
Update .config/niri/dms/wpblur.kdl
Update .config/niri/windowrules.kdl
Update .local/bin/low-battery-warn
This commit is contained in:
Lewis Wynne 2025-12-18 11:16:53 +00:00
parent 3a812a7268
commit 62d6e2d268
7 changed files with 70 additions and 61 deletions

View file

@ -1,7 +1,6 @@
#!/usr/bin/env bash
THRESHOLD=15
EXPIRY_MS=120000 # 2 minutes
# Find the battery device (first one found)
BATTERY=$(upower -e | grep battery | head -n1)
@ -22,6 +21,6 @@ echo "$(date '+%Y-%m-%d %H:%M:%S') Battery state: $STATE, percentage: $PERCENT"
# Only notify if discharging and below threshold
if [ "$STATE" = "discharging" ] && [ "$PERCENT" -lt "$THRESHOLD" ]; then
notify-send -u critical -t "$EXPIRY_MS" "Battery low" "Battery at ${PERCENT}% and discharging."
notify-send "Battery low" "Battery at ${PERCENT}% and discharging."
echo "$(date '+%Y-%m-%d %H:%M:%S') Notification sent: Battery at ${PERCENT}% and discharging."
fi