Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

37 lines
923 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #! /bin/sh
  2. bat=$(cat /sys/class/power_supply/BAT0/capacity)
  3. status=$(cat /sys/class/power_supply/BAT0/status)
  4. ramp10=
  5. ramp20=
  6. ramp30=
  7. ramp40=
  8. ramp50=
  9. ramp60=
  10. ramp70=
  11. ramp80=
  12. ramp90=
  13. ramp100=
  14. if [[ $bat -lt 10 ]]; then
  15. echo "^c#ebcb8b^$ramp10^d^ $bat% "
  16. elif [[ $bat -lt 20 ]]; then
  17. echo "^c#ebcb8b^$ramp20^d^ $bat% "
  18. elif [[ $bat -lt "30" ]]; then
  19. echo "^c#ebcb8b^$ramp30^d^ $bat% "
  20. elif [[ $bat -lt "40" ]]; then
  21. echo "^c#ebcb8b^$ramp40^d^ $bat% "
  22. elif [[ $bat -lt "50" ]]; then
  23. echo "^c#ebcb8b^$ramp50^d^ $bat% "
  24. elif [[ $bat -lt "60" ]]; then
  25. echo "^c#ebcb8b^$ramp60^d^ $bat% "
  26. elif [[ $bat -lt "70" ]]; then
  27. echo "^c#ebcb8b^$ramp70^d^ $bat% "
  28. elif [[ $bat -lt "80" ]]; then
  29. echo "^c#ebcb8b^$ramp80^d^ $bat% "
  30. elif [[ $bat -lt "90" ]]; then
  31. echo "^c#ebcb8b^$ramp90^d^ $bat% "
  32. elif [[ $bat -le "100" ]]; then
  33. echo "^c#ebcb8b^$ramp100^d^ $bat% "
  34. fi