Last active
February 20, 2020 10:04
-
-
Save totetmatt/da60e73576de5f453b8dadb2d8e63f4a to your computer and use it in GitHub Desktop.
Cron alarm
This file contains 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
# crontab -l | |
59 09 * * 1-5 export DISPLAY=:0.0 && /usr/bin/play.sh | |
# ^---------- better to wrap the command to a script | |
# ^------make it launchable without display / terminal | |
# | |
# /usr/bin/play.sh | |
#!/bin/bash | |
/usr/bin/mplayer -vo null -vc dummy -really-quiet -volume 75 -loop 2 "$(ls /home/totetmatt/Music/JRMelody/* | shuf | head -n 1)" > /dev/null 2>&1 | |
# ^ ^ ^ ^---- play it twice | |
# ^---------^---------^------------- make it launchable without display / terminal | |
# | |
# mplayer -> command line music player, you could replace to anything, even track music player or vlc ? | |
# $(ls /home/totetmatt/Music/JRMelody/* | shuf | head -n 1) | |
# ^--- get my ringtone playlist ^ ^--------- take the first one | |
# ^---- shuffle the list | |
# Using Tokyo Metro station Melody #DenshaOtaku | |
# https://www.reddit.com/r/japan/comments/116iv2/jr_east_train_departure_melodiesjingles_ringtones/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment