summaryrefslogtreecommitdiff
path: root/trivmix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-08 19:01:10 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-08 19:01:10 +0100
commit6454da50559e0eee810f81d33365a621857d8068 (patch)
tree6122875defb3062b410ee787ee9b7b0e5d5fd4f5 /trivmix
parentc22d1fbab9ffd09d461b82b096d9cac0edea7775 (diff)
downloadtrivmix-6454da50559e0eee810f81d33365a621857d8068.tar
trivmix-6454da50559e0eee810f81d33365a621857d8068.tar.gz
trivmix-6454da50559e0eee810f81d33365a621857d8068.tar.bz2
trivmix-6454da50559e0eee810f81d33365a621857d8068.tar.xz
trivmix-6454da50559e0eee810f81d33365a621857d8068.zip
Fix build
Diffstat (limited to 'trivmix')
-rw-r--r--trivmix/Trivmix.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/trivmix/Trivmix.hs b/trivmix/Trivmix.hs
index b437abc..a13460f 100644
--- a/trivmix/Trivmix.hs
+++ b/trivmix/Trivmix.hs
@@ -30,6 +30,7 @@ import System.IO
30import System.FileLock 30import System.FileLock
31import System.INotify 31import System.INotify
32 32
33import Data.Monoid
33import Data.Char 34import Data.Char
34import Data.Function 35import Data.Function
35 36
@@ -41,6 +42,7 @@ data Options = Options
41 { input :: String 42 { input :: String
42 , output :: String 43 , output :: String
43 , client :: String 44 , client :: String
45 , initialLevel :: Level
44 , run :: Maybe String 46 , run :: Maybe String
45 , levelFiles :: [FilePath] 47 , levelFiles :: [FilePath]
46 } 48 }
@@ -63,6 +65,12 @@ optionParser = Options
63 <> metavar "STRING" 65 <> metavar "STRING"
64 <> help "Client name to use in jack (the part before the colon in port names)" 66 <> help "Client name to use in jack (the part before the colon in port names)"
65 ) 67 )
68 <*> option auto ( long "level"
69 <> metavar "LEVEL"
70 <> help "Initial value for level"
71 <> value def
72 <> showDefault
73 )
66 <*> optional ( strOption ( long "run" 74 <*> optional ( strOption ( long "run"
67 <> metavar "FILE" 75 <> metavar "FILE"
68 <> help "Execute a file once setup of jacks is done (use this to autoconnect)\nThe executable gets passed the input port (including client name) as its first argument and the output as its second." 76 <> help "Execute a file once setup of jacks is done (use this to autoconnect)\nThe executable gets passed the input port (including client name) as its first argument and the output as its second."
@@ -84,9 +92,6 @@ watchedAttrs = [ Modify
84 , DeleteSelf 92 , DeleteSelf
85 ] 93 ]
86 94
87initialLevel :: Level
88initialLevel = def
89
90defFileMode :: FileMode 95defFileMode :: FileMode
91defFileMode = foldl unionFileModes nullFileMode [ ownerReadMode 96defFileMode = foldl unionFileModes nullFileMode [ ownerReadMode
92 , ownerWriteMode 97 , ownerWriteMode