summaryrefslogtreecommitdiff
path: root/.scripts/battery
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-10-01 00:56:51 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-10-01 00:56:51 +0530
commitded37b8f6515772648527fe2a3e9d9d490066ca0 (patch)
tree9f2fe68e715f67bc6685b9e2e14a9947c479bfa8 /.scripts/battery
parent7ce96f4805774b256b4d1f1f7be89ae182dbceca (diff)
minimizing scripts + replacing emojis for fonticons
Diffstat (limited to '.scripts/battery')
-rwxr-xr-x.scripts/battery8
1 files changed, 4 insertions, 4 deletions
diff --git a/.scripts/battery b/.scripts/battery
index ab01b9b..1f33383 100755
--- a/.scripts/battery
+++ b/.scripts/battery
@@ -13,10 +13,10 @@ for battery in /sys/class/power_supply/BAT?*; do
if [ "$capacity" -ge 75 ] && [ "$capacity" -le 100 ]
then
capacity_lvl=" "
- elif [ 51<="$capacity" && "$capacity"<=75 ]
+ elif [ "$capacity" -ge 51 ] && [ "$capacity" -le 75 ]
then
capacity_lvl=" "
- elif [ 25<="$capacity" && "$capacity"<=50 ]
+ elif [ "$capacity" -ge 25 ] && [ "$capacity" -le 50 ]
then
capacity_lvl=" "
else
@@ -25,10 +25,10 @@ for battery in /sys/class/power_supply/BAT?*; do
# Sets up the status and capacity
case "$(cat "$battery/status" 2>&1)" in
- "Full") status="⚡" ;;
+ "Full") status="" ;;
# "Discharging") status="$capacity-level" ;;
"Discharging") status="$capacity_lvl" ;;
- "Charging") status="🔌" ;;
+ "Charging") status=" " ;;
"Not charging") status="🛑" ;;
"Unknown") status="🟢" ;;
*) exit 1 ;;