mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-10 00:41:52 -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 `list` and `saveExcursion` to the list of Emacs commands.
|
||||||
|
|
||||||
|
- Added `toList` to easily lift a `String` to an `X Input`.
|
||||||
|
|
||||||
* `XMonad.Util.Parser`
|
* `XMonad.Util.Parser`
|
||||||
|
|
||||||
- Added the `gather`, `count`, `between`, `option`, `optionally`,
|
- Added the `gather`, `count`, `between`, `option`, `optionally`,
|
||||||
|
@@ -49,6 +49,7 @@ module XMonad.Util.Run (
|
|||||||
spawnExternalProcess,
|
spawnExternalProcess,
|
||||||
proc,
|
proc,
|
||||||
getInput,
|
getInput,
|
||||||
|
toInput,
|
||||||
|
|
||||||
-- ** Programs
|
-- ** Programs
|
||||||
inEditor,
|
inEditor,
|
||||||
@@ -364,6 +365,10 @@ infixr 3 >-$
|
|||||||
proc :: X Input -> X ()
|
proc :: X Input -> X ()
|
||||||
proc xi = spawn =<< getInput xi
|
proc xi = spawn =<< getInput xi
|
||||||
|
|
||||||
|
-- | Create an effectful 'Input' from a 'String'.
|
||||||
|
toInput :: String -> X Input
|
||||||
|
toInput = pure . mkDList
|
||||||
|
|
||||||
-- | Get the completed input string.
|
-- | Get the completed input string.
|
||||||
getInput :: X Input -> X String
|
getInput :: X Input -> X String
|
||||||
getInput xi = xi <&> ($ "")
|
getInput xi = xi <&> ($ "")
|
||||||
|
Reference in New Issue
Block a user