dotfiles/.config/polybar/scripts/battery-combined-tlp.sh
2024-01-29 08:31:23 -06:00

6 lines
113 B
Bash

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