X.U.Run: Add toInput

This commit is contained in:
Tony Zorman
2023-08-08 20:00:25 +02:00
parent bf41a85d9c
commit 0ca3ce7a18
2 changed files with 7 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ module XMonad.Util.Run (
spawnExternalProcess,
proc,
getInput,
toInput,
-- ** Programs
inEditor,
@@ -364,6 +365,10 @@ infixr 3 >-$
proc :: X Input -> X ()
proc xi = spawn =<< getInput xi
-- | Create an effectful 'Input' from a 'String'.
toInput :: String -> X Input
toInput = pure . mkDList
-- | Get the completed input string.
getInput :: X Input -> X String
getInput xi = xi <&> ($ "")