From da19222ee9c31c6d5b9844397f07377c220ee97c Mon Sep 17 00:00:00 2001 From: pingu Date: Mon, 4 Mar 2024 12:26:37 +0100 Subject: [PATCH] begin --- exe/Main.hs | 18 +++++++++++++++++- snaus.cabal | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/exe/Main.hs b/exe/Main.hs index 65ae4a0..055c23a 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -1,4 +1,20 @@ module Main where +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 + +playHeadless :: FilePath -> IO ProcessHandle +playHeadless = spawnCommand . (++) "mpv --vid=no " + main :: IO () -main = putStrLn "Hello, Haskell!" +main = + getWorkingDirectory >>= \a -> + pure () diff --git a/snaus.cabal b/snaus.cabal index e03e28e..7a67f81 100644 --- a/snaus.cabal +++ b/snaus.cabal @@ -75,6 +75,7 @@ executable snaus , directory , vty , hashmap-io + , process -- Directories containing source files. hs-source-dirs: exe