Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:f64b634dd8
This commit is contained in:
13
dots/.bin/sb-battery
Executable file
13
dots/.bin/sb-battery
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cap="$(cat /sys/class/power_supply/BAT0/capacity)"
|
||||
|
||||
if [ "$cap" -ge 33 ];then
|
||||
color="\x01"
|
||||
elif [ "$cap" -ge 10 ]; then
|
||||
color="\x03"
|
||||
else
|
||||
color="\x04"
|
||||
fi
|
||||
|
||||
echo -n -e "$color $cap% \x01"
|
||||
Reference in New Issue
Block a user