Skip to content

Instantly share code, notes, and snippets.

@gmelodie
Created July 10, 2017 16:35
Show Gist options
  • Save gmelodie/21b953645453fdb72b169bc92b464d85 to your computer and use it in GitHub Desktop.
Save gmelodie/21b953645453fdb72b169bc92b464d85 to your computer and use it in GitHub Desktop.
Script to play song after waiting some time, hence wakeup.sh
#!/bin/bash
export DISPLAY=:0.0
export SONGPATH=(~/Music/Aerosmith\ -\ Complete\ Discography/"01. Mama Kin.mp3")
read -p "How many hours should I wait? " hours
read -p "How many minutes should I wait? " minutes
time=$hours*60+$minutes
sleep $time
vlc "$SONGPATH" 2>&1 > /dev/null &
@gmelodie
Copy link
Author

used this at the end of the semester when I needed to wake up but my phone was broken (didn't rely enough on my internet to use some web-based clock app)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment