Copyright | (c) 2018 Jose Antonio Ortega Ruiz |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | jao@gnu.org |
Stability | unstable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Xmobar.Plugins.Monitors.Common.Types
Description
Type definitions and constructors for Monitors
Synopsis
- type Monitor a = ReaderT MConfig IO a
- data MConfig = MC {
- normalColor :: IORef (Maybe String)
- low :: IORef Int
- lowColor :: IORef (Maybe String)
- high :: IORef Int
- highColor :: IORef (Maybe String)
- template :: IORef String
- export :: IORef [String]
- ppad :: IORef Int
- decDigits :: IORef Int
- minWidth :: IORef Int
- maxWidth :: IORef Int
- maxWidthEllipsis :: IORef String
- padChars :: IORef String
- padRight :: IORef Bool
- barBack :: IORef String
- barFore :: IORef String
- barWidth :: IORef Int
- useSuffix :: IORef Bool
- naString :: IORef String
- maxTotalWidth :: IORef Int
- maxTotalWidthEllipsis :: IORef String
- data Opts
- = HighColor String
- | NormalColor String
- | LowColor String
- | Low String
- | High String
- | Template String
- | PercentPad String
- | DecDigits String
- | MinWidth String
- | MaxWidth String
- | Width String
- | WidthEllipsis String
- | PadChars String
- | PadAlign String
- | BarBack String
- | BarFore String
- | BarWidth String
- | UseSuffix String
- | NAString String
- | MaxTotalWidth String
- | MaxTotalWidthEllipsis String
- type Selector a = MConfig -> IORef a
- setConfigValue :: a -> Selector a -> Monitor ()
- mkMConfig :: String -> [String] -> IO MConfig
- io :: IO a -> Monitor a
- data MonitorConfig = MonitorConfig {
- pNormalColor :: Maybe String
- pLow :: Int
- pLowColor :: Maybe String
- pHigh :: Int
- pHighColor :: Maybe String
- pTemplate :: String
- pExport :: [String]
- pPpad :: Int
- pDecDigits :: Int
- pMinWidth :: Int
- pMaxWidth :: Int
- pMaxWidthEllipsis :: String
- pPadChars :: String
- pPadRight :: Bool
- pBarBack :: String
- pBarFore :: String
- pBarWidth :: Int
- pUseSuffix :: Bool
- pNaString :: String
- pMaxTotalWidth :: Int
- pMaxTotalWidthEllipsis :: String
- getPConfigValue :: MonitorConfig -> PSelector a -> a
- getConfigValue :: Selector a -> Monitor a
- getMonitorConfig :: MConfig -> IO MonitorConfig
- type PSelector a = MonitorConfig -> a
- data TemplateInput = TemplateInput {
- temMonitorValues :: [String]
- temInputTemplate :: [(String, String, String)]
- temAllTemplate :: [(String, [(String, String, String)])]
Documentation
Constructors
MC | |
Fields
|
Constructors
HighColor String | |
NormalColor String | |
LowColor String | |
Low String | |
High String | |
Template String | |
PercentPad String | |
DecDigits String | |
MinWidth String | |
MaxWidth String | |
Width String | |
WidthEllipsis String | |
PadChars String | |
PadAlign String | |
BarBack String | |
BarFore String | |
BarWidth String | |
UseSuffix String | |
NAString String | |
MaxTotalWidth String | |
MaxTotalWidthEllipsis String |
setConfigValue :: a -> Selector a -> Monitor () Source #
data MonitorConfig Source #
Constructors
MonitorConfig | |
Fields
|
Instances
Eq MonitorConfig Source # | |
Defined in Xmobar.Plugins.Monitors.Common.Types | |
Ord MonitorConfig Source # | |
Defined in Xmobar.Plugins.Monitors.Common.Types Methods compare :: MonitorConfig -> MonitorConfig -> Ordering (<) :: MonitorConfig -> MonitorConfig -> Bool (<=) :: MonitorConfig -> MonitorConfig -> Bool (>) :: MonitorConfig -> MonitorConfig -> Bool (>=) :: MonitorConfig -> MonitorConfig -> Bool max :: MonitorConfig -> MonitorConfig -> MonitorConfig min :: MonitorConfig -> MonitorConfig -> MonitorConfig |
getPConfigValue :: MonitorConfig -> PSelector a -> a Source #
getConfigValue :: Selector a -> Monitor a Source #
getMonitorConfig :: MConfig -> IO MonitorConfig Source #
type PSelector a = MonitorConfig -> a Source #
data TemplateInput Source #
Constructors
TemplateInput | |
Fields
|