Copyright | (c) David Janssen 2019 |
---|---|
License | MIT |
Maintainer | janssen.dhj@gmail.com |
Stability | experimental |
Portability | non-portable (MPTC with FD, FFI to Linux-only c-code) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type Parser = Parsec Void Text
- newtype PErrors = PErrors (ParseErrorBundle Text Void)
- data CfgToken = CfgToken {}
- data DefButton
- = KRef Text
- | KEmit Keycode
- | KLayerToggle Text
- | KLayerSwitch Text
- | KLayerAdd Text
- | KLayerRem Text
- | KTapNext DefButton DefButton
- | KTapHold Int DefButton DefButton
- | KTapHoldNext Int DefButton DefButton
- | KTapNextRelease DefButton DefButton
- | KTapHoldNextRelease Int DefButton DefButton
- | KAroundNext DefButton
- | KMultiTap [(Int, DefButton)] DefButton
- | KAround DefButton DefButton
- | KTapMacro [DefButton]
- | KComposeSeq [DefButton]
- | KPause Milliseconds
- | KLayerDelay Int LayerTag
- | KLayerNext LayerTag
- | KCommand Text
- | KTrans
- | KBlock
- data DefSetting
- type DefSettings = [DefSetting]
- type DefAlias = [(Text, DefButton)]
- data DefLayer = DefLayer {
- _layerName :: Text
- _buttons :: [DefButton]
- type DefSrc = [Keycode]
- data KExpr
- data IToken
- data OToken
- class AsKExpr r where
- _KExpr :: Prism' r KExpr
- _KDefCfg :: Prism' r DefSettings
- _KDefSrc :: Prism' r DefSrc
- _KDefLayer :: Prism' r DefLayer
- _KDefAlias :: Prism' r DefAlias
- class AsDefSetting r where
- module Text.Megaparsec
- module Text.Megaparsec.Char
$bsc
The type of errors returned by the Megaparsec parsers
Instances
Show PErrors Source # | |
Exception PErrors Source # | |
Defined in KMonad.Args.Types toException :: PErrors -> SomeException # fromException :: SomeException -> Maybe PErrors # displayException :: PErrors -> String # |
$cfg
$but
Button ADT
KRef Text | Reference a named button |
KEmit Keycode | Emit a keycode |
KLayerToggle Text | Toggle to a layer when held |
KLayerSwitch Text | Switch base-layer when pressed |
KLayerAdd Text | Add a layer when pressed |
KLayerRem Text | Remove top instance of a layer when pressed |
KTapNext DefButton DefButton | Do 2 things based on behavior |
KTapHold Int DefButton DefButton | Do 2 things based on behavior and delay |
KTapHoldNext Int DefButton DefButton | Mixture between KTapNext and KTapHold |
KTapNextRelease DefButton DefButton | Do 2 things based on behavior |
KTapHoldNextRelease Int DefButton DefButton | Like KTapNextRelease but with a timeout |
KAroundNext DefButton | Surround a future button |
KMultiTap [(Int, DefButton)] DefButton | Do things depending on tap-count |
KAround DefButton DefButton | Wrap 1 button around another |
KTapMacro [DefButton] | Sequence of buttons to tap |
KComposeSeq [DefButton] | Compose-key sequence |
KPause Milliseconds | Pause for a period of time |
KLayerDelay Int LayerTag | Switch to a layer for a period of time |
KLayerNext LayerTag | Perform next button in different layer |
KCommand Text | Execute a shell command |
KTrans | Transparent button that does nothing |
KBlock | Button that catches event |
$tls
data DefSetting Source #
All possible single settings
Instances
Show DefSetting Source # | |
Defined in KMonad.Args.Types showsPrec :: Int -> DefSetting -> ShowS # show :: DefSetting -> String # showList :: [DefSetting] -> ShowS # | |
AsDefSetting DefSetting Source # | |
Defined in KMonad.Args.Types |
type DefSettings = [DefSetting] Source #
A list of different DefSetting
values
A layer of buttons
DefLayer | |
|
Any statement in a config-file must parse to a KExpr
$defio
All different input-tokens KMonad can take
All different output-tokens KMonad can take
$lenses
class AsDefSetting r where Source #
_DefSetting :: Prism' r DefSetting Source #
_SIToken :: Prism' r IToken Source #
_SOToken :: Prism' r OToken Source #
_SCmpSeq :: Prism' r DefButton Source #
_SInitStr :: Prism' r Text Source #
_SFallThrough :: Prism' r Bool Source #
_SAllowCmd :: Prism' r Bool Source #
Instances
AsDefSetting DefSetting Source # | |
Defined in KMonad.Args.Types |
Reexports
module Text.Megaparsec
module Text.Megaparsec.Char