Last active
June 25, 2018 13:02
-
-
Save kokoye2007/2575aebeefd469372d450e558a58bf91 to your computer and use it in GitHub Desktop.
RainyMood App - Terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# sudo wget -O /usr/local/bin/rainymood https://gist.githubusercontent.com/kokoye2007/2575aebeefd469372d450e558a58bf91/raw/d908acf0ea70503d4faffb0d297fa10f6e544bc1/rainymood.sh | |
# sudo chmod +x /usr/local/bin/rainymood | |
# rainymood | |
# | |
# Download script edit by [email protected] | |
# FOSSMyanmar Ubuntu-MM | |
# you can change download dir .rainymood | |
# you can change mpv to vlc or else | |
MYPLAYER=mpv | |
checkdir() { | |
RMM="$HOME/.rainymood" | |
if [ -d "$RMM" ]; then | |
echo "Rainymood in ~/.rainymood" | |
else | |
mkdir "$RMM" | |
fi | |
} | |
rainymood() { | |
URL="https://rainymood.com/audio1110" | |
checkdir | |
for i in $((RANDOM%4)) # Just 4 file | |
do | |
if [ -f $RMM/$i.ogg ]; then | |
echo "$i.ogg is ready" | |
$MYPLAYER $RMM/$i.ogg | |
else | |
wget -O $RMM/$i.ogg $URL/$i.ogg | |
echo "Download $i.ogg" | |
$MYPLAYER $RMM/$i.ogg | |
fi | |
done | |
} | |
rainymood |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment