termplayer-mpv-linux.sh 801 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. case $1 in
  3. "")
  4. echo "Write directory"
  5. read dir
  6. cd $dir
  7. while true; do
  8. ls -a > /etc/termplayer-mpv/lists
  9. export dirs=$(cat /etc/termplayer-mpv/lists | fzf --color=bw)
  10. clear
  11. cd "${dirs}" || mpv "${dirs}"
  12. done
  13. ;;
  14. -h)
  15. echo "Ctrl-Z for exit"
  16. echo "-R, - run one song for repeat"
  17. echo "0 - low volume"
  18. echo "9 - high volume"
  19. ;;
  20. -R)
  21. echo "Write directory"
  22. read dirr
  23. cd $dirr
  24. while true; do
  25. ls -a > /etc/termplayer-mpv/lists
  26. export dirrs=$(cat /etc/termplayer-mpv/lists | fzf --color=bw)
  27. cd "${dirrs}" || while true; do mpv "${dirrs}"; done
  28. done
  29. ;;
  30. esac