aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-04-05 11:33:08 +0900
committerSean Whitton <spwhitton@spwhitton.name>2015-04-05 11:33:08 +0900
commit330a4f9562f9e71ebf680451b8ed78790b103f30 (patch)
treee89eac5c0f13fe46e0072e42aba040acf6338732
parent654af547f5ace39f73c7757f83065c5e882c605f (diff)
downloadsrem-330a4f9562f9e71ebf680451b8ed78790b103f30.tar.gz
hide aplay output
-rw-r--r--src/Utility/Notify/Posix.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Utility/Notify/Posix.hs b/src/Utility/Notify/Posix.hs
index b802356..3782405 100644
--- a/src/Utility/Notify/Posix.hs
+++ b/src/Utility/Notify/Posix.hs
@@ -33,7 +33,7 @@ import System.Directory (getDirectoryContents, getHomeDirectory,
getModificationTime, doesDirectoryExist)
import System.Environment (getEnvironment, setEnv)
import System.FilePath ((</>))
-import System.Process (readProcess, runCommand)
+import System.Process (readProcessWithExitCode)
import DBus (Address, parseAddress)
import DBus.Client (Client, ClientError, connect)
@@ -50,16 +50,17 @@ sendNotifications rems =
client <- connect address
mapM_ (sendNotification client) rems)
-sendNotification :: Client -> Reminder -> IO Notification
+sendNotification :: Client -> Reminder -> IO ()
sendNotification c rem = do
let (title:content) = words . getReminderText $ rem
soundFile <- SremConfig.notificationSound
- runCommand $ "aplay " ++ soundFile
notify c blankNote { appName = "srem"
, body = (Just . Text . unwords) content
, summary = title
, expiry = Milliseconds 10000
, hints = [ SoundFile soundFile ]}
+ (_, _, _) <- readProcessWithExitCode "aplay" [soundFile] ""
+ return ()
getDBusUserAddress :: IO (Maybe Address)
getDBusUserAddress = do