chezmoi/dot_dotfiles/polybar/polybar-scripts/polybar-scripts/battery-combined-tlp/battery-combined-tlp.sh

6 lines
113 B
Bash

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