Advertisement
bal_gennady

mpv conf

Nov 23rd, 2019
1,272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.66 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ext="${1##*.}"
  4. mpvFiles="mkv mp4 avi mov wmv flv gif"
  5. fehFiles="png jpg jpeg jpe"
  6. wgetFiles="mp3 flac opus mp3?source=feed pdf"
  7.  
  8. if echo $fehFiles | grep -w $ext > /dev/null; then
  9.     nohup gpicview "$1" >/dev/null &
  10. elif echo $mpvFiles | grep -w $ext > /dev/null; then
  11.     nohup mpv --loop --quiet "$1" > /dev/null &
  12. elif echo $wgetFiles | grep -w $ext > /dev/null; then
  13.     nohup wget "$1" >/dev/null &
  14. elif echo $1 | grep youtube > /dev/null; then
  15.     nohup mpv "$1" > /dev/null &
  16. elif echo $1 | grep youtu.be > /dev/null; then
  17.     nohup mpv "$1" > /dev/null &
  18. elif echo $1 | grep vimeo > /dev/null; then
  19.     nohup mpv "$1" > /dev/null &
  20. else
  21.     nohup firefox "$1" >/dev/null &
  22. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement