Lemur Pro nixos 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.

28 lines
513 B

2 years ago
  1. #!/bin/bash
  2. case "$1" in
  3. [Ss]tatus)
  4. OT="$(mpc status -f "%file%" | head -n 1)"
  5. if echo "$OT" | grep "volume:" > /dev/null ; then
  6. echo "MPD Inactive";
  7. else
  8. echo "$OT";
  9. fi
  10. ;;
  11. [Pp]aused)
  12. OT="$(mpc status 2> /dev/null)"
  13. if echo "$OT" | head -n 1 | grep "volume:" > /dev/null; then
  14. echo "⏹"
  15. exit;
  16. fi
  17. if echo "$OT" | grep "paused" > /dev/null; then
  18. echo "⏵"
  19. else
  20. echo "⏸"
  21. fi
  22. ;;
  23. *)
  24. echo "No arg exists for $1";
  25. ;;
  26. esac