mirror of
https://github.com/Keyitdev/dotfiles.git
synced 2026-09-24 01:52:09 +00:00
Update: Added cava and fonts, updated configs, delted useless rofi configs.
This commit is contained in:
+6
-6
@@ -6,13 +6,13 @@ for pid in $(pidof -x battery); do
|
||||
fi
|
||||
done
|
||||
|
||||
DIR="/usr/local/bin/icons"
|
||||
DIR_ICONS="/usr/local/bin/icons"
|
||||
|
||||
# Notify when below this percentage
|
||||
warning_level=15
|
||||
WARNING_LEVEL=15
|
||||
|
||||
# How often to check battery status, in minutes
|
||||
check_interval=1
|
||||
CHECK_INTERVAL=1
|
||||
|
||||
while true; do
|
||||
battery_level=$(acpi -b \
|
||||
@@ -21,15 +21,15 @@ while true; do
|
||||
charging=$(acpi -b | grep -c "Charging")
|
||||
|
||||
# When battery is low, and not already charging
|
||||
if [ $battery_level -lt $warning_level ] &&
|
||||
if [ $battery_level -lt $WARNING_LEVEL ] &&
|
||||
[ $charging -eq 0 ]
|
||||
then
|
||||
dunstify -a "Battery" \
|
||||
"Low battery: ${battery_level}%" \
|
||||
"Battery is running low" \
|
||||
-r 100 \
|
||||
-i $DIR/battery.svg
|
||||
-i $DIR_ICONS/battery.svg
|
||||
fi
|
||||
|
||||
sleep ${check_interval}m
|
||||
sleep ${CHECK_INTERVAL}m
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user