dotfiles/config/polybar/scripts/battery-combined-tlp.sh
2020-09-27 21:55:01 +03:00

5 lines
No EOL
114 B
Bash
Executable file

#!/bin/sh
battery=$(sudo tlp-stat -b | tac | grep -m 1 "Charge" | tr -d -c "[:digit:],.")
echo "$battery %"