ENH add log contraints to spawnpipe
This commit is contained in:
parent
0895586cf7
commit
6891238793
|
@ -210,7 +210,7 @@ runClipMenu = sometimesIO_ "clipboard manager" "rofi greenclip" tree act
|
|||
-- Shortcut menu
|
||||
|
||||
runShowKeys
|
||||
:: MonadUnliftIO m
|
||||
:: (MonadReader env m, HasLogFunc env, MonadUnliftIO m)
|
||||
=> Always ([((KeyMask, KeySym), NamedAction)] -> m ())
|
||||
runShowKeys =
|
||||
Always "keyboard menu" $
|
||||
|
@ -225,7 +225,7 @@ runShowKeys =
|
|||
defNoteError {body = Just $ Text "could not display keymap"}
|
||||
|
||||
showKeysDMenu
|
||||
:: MonadUnliftIO m
|
||||
:: (MonadReader env m, HasLogFunc env, MonadUnliftIO m)
|
||||
=> SubfeatureRoot ([((KeyMask, KeySym), NamedAction)] -> m ())
|
||||
showKeysDMenu =
|
||||
Subfeature
|
||||
|
@ -233,7 +233,10 @@ showKeysDMenu =
|
|||
, sfData = IORoot_ showKeys $ Only_ dmenuDep
|
||||
}
|
||||
|
||||
showKeys :: MonadUnliftIO m => [((KeyMask, KeySym), NamedAction)] -> m ()
|
||||
showKeys
|
||||
:: (MonadReader env m, HasLogFunc env, MonadUnliftIO m)
|
||||
=> [((KeyMask, KeySym), NamedAction)]
|
||||
-> m ()
|
||||
showKeys kbs = do
|
||||
h <- spawnPipe cmd
|
||||
B.hPut h $ BC.unlines $ BC.pack <$> showKm kbs
|
||||
|
|
|
@ -85,7 +85,10 @@ spawn :: MonadIO m => T.Text -> m ()
|
|||
spawn = X.spawn . T.unpack
|
||||
|
||||
-- | Run 'XMonad.Run.Utils.spawnPipe' with 'Text' input.
|
||||
spawnPipe :: MonadIO m => T.Text -> m Handle
|
||||
spawnPipe
|
||||
:: (MonadReader env m, HasLogFunc env, MonadUnliftIO m)
|
||||
=> T.Text
|
||||
-> m Handle
|
||||
spawnPipe = XR.spawnPipe . T.unpack
|
||||
|
||||
-- | Run 'XMonad.Core.spawn' with a command and arguments
|
||||
|
|
Loading…
Reference in New Issue