snaus/exe/Main.hs

22 lines
617 B
Haskell
Raw Normal View History

2024-03-03 18:01:26 +00:00
module Main where
2024-03-04 11:26:37 +00:00
import System.Posix.Directory ( getWorkingDirectory )
import System.Directory.Extra ( listContents )
import Control.Monad ( (<=<), filterM )
import System.Process ( ProcessHandle, spawnCommand )
fetchLocalAudio :: FilePath -> IO [FilePath]
fetchLocalAudio = filterM isAudioVideo <=< listContents
isAudioVideo :: FilePath -> IO Bool
isAudioVideo = undefined
-- Paths need to be escaped if containing certain characters
playHeadless :: FilePath -> IO ProcessHandle
playHeadless = spawnCommand . (++) "mpv --vid=no "
2024-03-03 18:01:26 +00:00
main :: IO ()
2024-03-04 11:26:37 +00:00
main =
getWorkingDirectory >>= \a ->
pure ()