Created
April 15, 2014 10:21
-
-
Save gatlin/10720633 to your computer and use it in GitHub Desktop.
Load this into ghci, load a song into your MPD playlist, and then run startTimer with the correct number of seconds.
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
{-# LANGUAGE OverloadedStrings #-} | |
import Network.MPD | |
import Control.Concurrent.Timer | |
import Control.Concurrent.Suspend.Lifted | |
import System.Environment | |
startTimer seconds = oneShotTimer (withMPD (play Nothing) >> return ()) (sDelay (fromInteger seconds)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment