My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
285 B

  1. #!/bin/sh
  2. printf "^c#222222^"
  3. bat=$(cat /sys/class/power_supply/BAT1/capacity)
  4. if [ $bat -le 25 ]; then
  5. printf "^b#ffa3a3^ "
  6. elif [ $bat -le 50 ]; then
  7. printf "^b#fbcea0^ "
  8. elif [ $bat -le 75 ]; then
  9. printf "^b#c2d79e^ "
  10. else
  11. printf "^b#89e19c^ "
  12. fi