summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorShubham Saini <shubham6405@gmail.com>2020-06-03 12:19:55 +0000
committerShubham Saini <shubham6405@gmail.com>2020-06-03 12:19:55 +0000
commitf967b69520737b4bf011427ecff6be070bc1369d (patch)
tree4827d29313c956ebdb3ce42dde62903f607756c3 /bin
parentce2dba57e8b2a25a0533f1119cf4f227b4a57522 (diff)
i'm dumb
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/bat_check.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/.local/bin/bat_check.sh b/bin/.local/bin/bat_check.sh
index 4559954..453d129 100755
--- a/bin/.local/bin/bat_check.sh
+++ b/bin/.local/bin/bat_check.sh
@@ -3,7 +3,7 @@ while true
3do 3do
4 battery_level=$(cat /sys/class/power_supply/BAT0/capacity) 4 battery_level=$(cat /sys/class/power_supply/BAT0/capacity)
5 state=$(cat /sys/class/power_supply/BAT0/status) 5 state=$(cat /sys/class/power_supply/BAT0/status)
6 if [ $battery_level -ge 95 ] && [ $state == "Discharging" ]; then 6 if [ $battery_level -ge 95 ] && [ $state == "Charging" ]; then
7 notify-send 'Pull the plug!' $battery_level% 7 notify-send 'Pull the plug!' $battery_level%
8 elif [ $battery_level -le 30 -a $battery_level -ge 20 ] && [ $state == "Discharging" ]; then 8 elif [ $battery_level -le 30 -a $battery_level -ge 20 ] && [ $state == "Discharging" ]; then
9 notify-send 'Plug me!' $battery_level% 9 notify-send 'Plug me!' $battery_level%