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 Source #
Class that output converters have to implement
doLine :: a -> [[MonkyOut]] -> IO () Source #
Create one tick of output from a list of collection module output
class PollModule a where Source #
The New class for collection modules
getOutput :: a -> IO [MonkyOut] Source #
Get the current (new) output
initialize :: a -> IO () Source #
class EvtModule a where Source #
The class for eventing modules
startEvtLoop :: a -> ([MonkyOut] -> IO ()) -> IO () Source #
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
EvtModule WifiEvtHandle Source # | |
EvtModule PulseH Source # | |
EvtModule EvtPostHandle Source # | |
EvtModule EvtPrepHandle Source # | |
EvtModule MonkyList Source # | |
EvtModule MPDHandle Source # | |
EvtModule IBusH Source # | |
EvtModule AlsaH Source # | |
EvtModule a => EvtModule (IOModifyHandle a) Source # | |
EvtModule a => EvtModule (ModifyHandle a) Source # | |
(EvtModule a, EvtModule b) => EvtModule (EvtCombi a b) Source # | |
Wrapper around PollModules
and EvtModules
so we can pass all modules in one list to startLoop
data PollModules Source #
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