Maintainer | Toshio Ito <debug.ito@gmail.com> |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
This module exports everything you probably need to use WildBind in X11 environments.
Synopsis
- wildNumPad :: (NumPadPosition i, XKeyInput i, Describable i, Ord i, Enum i, Bounded i) => Binding ActiveWindow i -> IO ()
- wildNumPad' :: (NumPadPosition i, XKeyInput i, Describable i, Ord i, Enum i, Bounded i) => (Indicator ActiveWindow i -> Binding ActiveWindow i) -> IO ()
- module Control.Monad.IO.Class
- module Control.Monad.Trans.State
- module Data.Monoid
- data Text
- data Window
- type ActiveWindow = Window
- winInstance :: Window -> Text
- winClass :: Window -> Text
- winName :: Window -> Text
- data Indicator s i
- class NumPadPosition a where
- toNumPad :: a -> NumPadLocked
- updateDescription :: Indicator s i -> i -> ActionDescription -> IO ()
- getPresence :: Indicator s i -> IO Bool
- setPresence :: Indicator s i -> Bool -> IO ()
- togglePresence :: Indicator s i -> IO ()
- quit :: Indicator s i -> IO ()
Execution
wildNumPad :: (NumPadPosition i, XKeyInput i, Describable i, Ord i, Enum i, Bounded i) => Binding ActiveWindow i -> IO () Source #
A convenient function to create an executable action with X11
FrontEnd
and Indicator
for a number pad.
main :: IO () main = wildNumPad $ binds $ do on NumCenter `run` putStrLn "You pushed center."
Note that the executable must be compiled by ghc with
-threaded
option enabled.
With this function, the "/"
(divide) key on the numpad is bound
to toggling the Indicator
, ignoring the binding you provide.
For the input type i
, you can use NumPadUnlocked
or
NumPadLocked
.
wildNumPad' :: (NumPadPosition i, XKeyInput i, Describable i, Ord i, Enum i, Bounded i) => (Indicator ActiveWindow i -> Binding ActiveWindow i) -> IO () Source #
A more flexible version of wildNumPad
. It passes you an
Indicator
, and uses the Binding
you return as-is.
Re-exports
From basic modules
module Control.Monad.IO.Class
module Control.Monad.Trans.State
module Data.Monoid
A space efficient, packed, unboxed Unicode text type.
Instances
Hashable Text | |
Defined in Data.Hashable.Class | |
IsGValue (Maybe Text) | |
Defined in Data.GI.Base.GValue | |
type Item Text | |
From WindBind.X11
type ActiveWindow = Window #
winInstance :: Window -> Text #
From WildBind.Indicator
class NumPadPosition a where #
Instances
NumPadPosition NumPadLocked | |
Defined in WildBind.Indicator | |
NumPadPosition NumPadUnlocked | |
Defined in WildBind.Indicator |
updateDescription :: Indicator s i -> i -> ActionDescription -> IO () #
getPresence :: Indicator s i -> IO Bool #
setPresence :: Indicator s i -> Bool -> IO () #
togglePresence :: Indicator s i -> IO () #