Update Hyprland config for Matugen and untrack generated files.

This commit is contained in:
trey committed 2026-11-23 20:09:57 -05:00
1 parent 60fe219ff7
commit 16cf5e0c2e
10 files changed
+47 -55

No files matched your search

+8 -10
View File
@@ -20,24 +20,22 @@ while true; do
if [ "$STATUS" == "Discharging" ] && [ "$CAPACITY" -le 5 ]; then
if [ ! -f "/run/user/${UID}/battery_low" ]; then
logger "Low power! Triggering notification...."
# -p returns the ID so we can close it later
NOTIF_ID=$(dunstify --urgency=critical \
-p \
notify-send --urgency=critical \
--icon=/usr/share/icons/breeze-dark/emblems/16/emblem-warning.svg \
"LOW BATTERY!" \
"Battery level is at ${CAPACITY}%, plug power quick!")
echo "$NOTIF_ID" > "/run/user/${UID}/battery_low"
"Battery level is at ${CAPACITY}%, plug power quick!"
touch "/run/user/${UID}/battery_low"
fi
# Clear the notification if we plug back in and rise above 5%
# Clear the notification state if we plug back in and rise above 5%
elif [ "$STATUS" == "Charging" ] && [ "$CAPACITY" -gt 5 ]; then
if [ -f "/run/user/${UID}/battery_low" ]; then
logger "Power reconnected and above 5 percent, clearing notification state."
NOTIF_ID=$(cat "/run/user/${UID}/battery_low")
if [ -n "$NOTIF_ID" ]; then
dunstify --close=$NOTIF_ID
fi
notify-send --urgency=normal \
--icon=/usr/share/icons/breeze-dark/emblems/16/emblem-information.svg \
"Battery Charging" \
"Power connected. Battery level is at ${CAPACITY}%."
rm -f "/run/user/${UID}/battery_low"
fi