dotfiles.git

commit e3087dc739b9a1989e3d36720deed600af771234

Author: Adam Evyčędo <git@apiote.xyz>

fix battery notify

 .local/bin/bar_battery | 6 +++---


diff --git a/.local/bin/bar_battery b/.local/bin/bar_battery
index 730c6cdee7497a69303e28ed749cea288965d88c..98550017069aa8fe4b94829621214ebc9ca1d712 100755
--- a/.local/bin/bar_battery
+++ b/.local/bin/bar_battery
@@ -98,7 +98,7 @@ 					charging) notify-send -i battery-caution-charging-symbolic Battery charging ;;
 					discharging) notify-send -i battery-good-symbolic Battery discharging ;;
 					fully-charged) notify-send -i battery-full-charged-symbolic Battery full ;;
 				esac
-				last_notif="$state"
+				last_notify="$state"
 			fi
 		;;
 		*energy:*) energy=$(echo "$line" | tr -s ' ' | cut -d ' ' -f 2);;
@@ -114,11 +114,11 @@ 		fi
 		
 		if [ "$pc_prev" != "$pc" ]
 		then
-			if [ "$pc" -le 6 ] && [ "$state" = 'discharging' ] && [ "$last_notify" != '6']
+			if [ "$pc" -le 6 ] && [ "$state" = 'discharging' ] && [ "$last_notify" != '6' ]
 			then
 				notify-send -u critical -i battery-empty-symbolic Battery 'less than <sub>2</sub>6'
 				last_notify='6'
-			elif [ "$pc" -le 12 ] && [ "$state" = 'discharging' ] && [ "$last_notify" != '12']
+			elif [ "$pc" -le 12 ] && [ "$state" = 'discharging' ] && [ "$last_notify" != '12' ]
 			then
 				notify-send -i battery-low-symbolic Battery 'less than <sub>2</sub>10'
 				last_notify='12'