battery status for screen
This commit is contained in:
parent
6f57137730
commit
e325faf37d
1 changed files with 12 additions and 0 deletions
12
scripts/screen-bat.sh
Executable file
12
scripts/screen-bat.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
level="$(upower -d | grep "percentage" | cut -d' ' -f15- | head -n 1)"
|
||||
state="$(upower -d | grep "state" | cut -d' ' -f20- | head -n 1)"
|
||||
|
||||
case "$state" in
|
||||
charging) statesym="↑" ;;
|
||||
discharging) statesym="↓" ;;
|
||||
* ) statesym="$state" ;;
|
||||
esac
|
||||
|
||||
echo "$level $statesym"
|
||||
|
Loading…
Reference in a new issue