mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 04:31:52 -07:00
X.U.Run: Add toInput
This commit is contained in:
@@ -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 <&> ($ "")
|
||||
|
Reference in New Issue
Block a user