mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-09 16:31:53 -07:00
X.U.Run: Add toInput
This commit is contained in:
@@ -170,6 +170,8 @@
|
||||
|
||||
- Added `list` and `saveExcursion` to the list of Emacs commands.
|
||||
|
||||
- Added `toList` to easily lift a `String` to an `X Input`.
|
||||
|
||||
* `XMonad.Util.Parser`
|
||||
|
||||
- Added the `gather`, `count`, `between`, `option`, `optionally`,
|
||||
|
@@ -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