Maintainer | ongy, moepi |
---|---|
Stability | experimental |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
The EvtModule and PollModule classes have to be implemented by monky compatible modules
- data MonkyOut
- = MonkyPlain Text
- | MonkyBar Int
- | MonkyHBar Int
- | MonkyColor (Text, Text) MonkyOut
- | MonkyImage Text Char
- class MonkyOutput a where
- class PollModule a where
- class EvtModule a where
- data Modules
- data EvtModules = EvtModule a => DW a
- data PollModules = PollModule a => NMW a Int
- pollPack :: PollModule a => Int -> IO a -> IO Modules
- evtPack :: EvtModule a => IO a -> IO Modules
Documentation
A data type to encode general output types
MonkyPlain Text | Plaintext output |
MonkyBar Int | A Vertical bar, in % |
MonkyHBar Int | A horizontal bar, in pixel Temporary (FG,BG) Color format (and somewhat image) are not fix yet, so don't rely on them to much |
MonkyColor (Text, Text) MonkyOut | Colorize the enclosed output TODO: Color format |
MonkyImage Text Char | Path to an image to display (for icons), or Unicode glyph that should be used |
class MonkyOutput a where #
Class that output converters have to implement
class PollModule a where #
The New class for collection modules
The class for eventing modules
startEvtLoop :: a -> ([MonkyOut] -> IO ()) -> IO () #
Start your own event loop. The second argument is the consumer of your output.
Doing this in an opaque way gives a way to chain actions to your event handling
Wrapper around PollModules
and EvtModules
so we can pass all modules in one list to startLoop
data PollModules #
A wrapper around module instances so they can be put into a list.
PollModule a => NMW a Int |
:: PollModule a | |
=> Int | The refresh rate for this module |
-> IO a | The function to get a module (get??Handle) |
-> IO Modules | The packed module ready to be given to |
Function to make packaging modules easier