7
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
visningsskripts/bin/ny-vis

26 lines
395 B
Plaintext
Raw Permalink Normal View History

2014-08-31 20:42:30 +02:00
#!/bin/bash
xset dpms force on
echo "Hold your breath and wait 15sec."
picture_type=(".jpg" ".jpeg" ".png" ".bmp")
for i in "${picture_type[@]}"; do
if [[ $1 == *$i ]]; then
mpv --keep-open "$1"
exit
fi
done
if [[ $1 == *".gif" ]]; then
mpv --loop=inf "$1"
else
if [[ $2 == "loop" ]]; then
mpv --loop=inf $(youtube-dl -g "$1")
else
mpv $(youtube-dl -g "$1")
fi
fi