-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A Minimalistic Text Based Status Bar -- -- Xmobar is a minimalistic text based status bar. -- -- Inspired by the Ion3 status bar, it supports similar features, like -- dynamic color management, output templates, and extensibility through -- plugins. @package xmobar @version 0.39 -- | Type definitions and constructors for Monitors module Xmobar.Plugins.Monitors.Common.Types type Monitor a = ReaderT MConfig IO a data MConfig MC :: IORef (Maybe String) -> IORef Int -> IORef (Maybe String) -> IORef Int -> IORef (Maybe String) -> IORef String -> IORef [String] -> IORef Int -> IORef Int -> IORef Int -> IORef Int -> IORef String -> IORef String -> IORef Bool -> IORef String -> IORef String -> IORef Int -> IORef Bool -> IORef String -> IORef Int -> IORef String -> MConfig [normalColor] :: MConfig -> IORef (Maybe String) [low] :: MConfig -> IORef Int [lowColor] :: MConfig -> IORef (Maybe String) [high] :: MConfig -> IORef Int [highColor] :: MConfig -> IORef (Maybe String) [template] :: MConfig -> IORef String [export] :: MConfig -> IORef [String] [ppad] :: MConfig -> IORef Int [decDigits] :: MConfig -> IORef Int [minWidth] :: MConfig -> IORef Int [maxWidth] :: MConfig -> IORef Int [maxWidthEllipsis] :: MConfig -> IORef String [padChars] :: MConfig -> IORef String [padRight] :: MConfig -> IORef Bool [barBack] :: MConfig -> IORef String [barFore] :: MConfig -> IORef String [barWidth] :: MConfig -> IORef Int [useSuffix] :: MConfig -> IORef Bool [naString] :: MConfig -> IORef String [maxTotalWidth] :: MConfig -> IORef Int [maxTotalWidthEllipsis] :: MConfig -> IORef String data Opts HighColor :: String -> Opts NormalColor :: String -> Opts LowColor :: String -> Opts Low :: String -> Opts High :: String -> Opts Template :: String -> Opts PercentPad :: String -> Opts DecDigits :: String -> Opts MinWidth :: String -> Opts MaxWidth :: String -> Opts Width :: String -> Opts WidthEllipsis :: String -> Opts PadChars :: String -> Opts PadAlign :: String -> Opts BarBack :: String -> Opts BarFore :: String -> Opts BarWidth :: String -> Opts UseSuffix :: String -> Opts NAString :: String -> Opts MaxTotalWidth :: String -> Opts MaxTotalWidthEllipsis :: String -> Opts -- | from 'http://www.haskell.org/hawiki/MonadState' type Selector a = MConfig -> IORef a setConfigValue :: a -> Selector a -> Monitor () mkMConfig :: String -> [String] -> IO MConfig io :: IO a -> Monitor a data MonitorConfig MonitorConfig :: Maybe String -> Int -> Maybe String -> Int -> Maybe String -> String -> [String] -> Int -> Int -> Int -> Int -> String -> String -> Bool -> String -> String -> Int -> Bool -> String -> Int -> String -> MonitorConfig [pNormalColor] :: MonitorConfig -> Maybe String [pLow] :: MonitorConfig -> Int [pLowColor] :: MonitorConfig -> Maybe String [pHigh] :: MonitorConfig -> Int [pHighColor] :: MonitorConfig -> Maybe String [pTemplate] :: MonitorConfig -> String [pExport] :: MonitorConfig -> [String] [pPpad] :: MonitorConfig -> Int [pDecDigits] :: MonitorConfig -> Int [pMinWidth] :: MonitorConfig -> Int [pMaxWidth] :: MonitorConfig -> Int [pMaxWidthEllipsis] :: MonitorConfig -> String [pPadChars] :: MonitorConfig -> String [pPadRight] :: MonitorConfig -> Bool [pBarBack] :: MonitorConfig -> String [pBarFore] :: MonitorConfig -> String [pBarWidth] :: MonitorConfig -> Int [pUseSuffix] :: MonitorConfig -> Bool [pNaString] :: MonitorConfig -> String [pMaxTotalWidth] :: MonitorConfig -> Int [pMaxTotalWidthEllipsis] :: MonitorConfig -> String getPConfigValue :: MonitorConfig -> PSelector a -> a getConfigValue :: Selector a -> Monitor a getMonitorConfig :: MConfig -> IO MonitorConfig type PSelector a = MonitorConfig -> a data TemplateInput TemplateInput :: [String] -> [(String, String, String)] -> [(String, [(String, String, String)])] -> TemplateInput [temMonitorValues] :: TemplateInput -> [String] [temInputTemplate] :: TemplateInput -> [(String, String, String)] [temAllTemplate] :: TemplateInput -> [(String, [(String, String, String)])] instance GHC.Classes.Ord Xmobar.Plugins.Monitors.Common.Types.MonitorConfig instance GHC.Classes.Eq Xmobar.Plugins.Monitors.Common.Types.MonitorConfig -- | Running a monitor module Xmobar.Plugins.Monitors.Common.Run runM :: [String] -> IO MConfig -> ([String] -> Monitor String) -> Int -> (String -> IO ()) -> IO () runMD :: [String] -> IO MConfig -> ([String] -> Monitor String) -> Int -> ([String] -> Monitor Bool) -> (String -> IO ()) -> IO () runMB :: [String] -> IO MConfig -> ([String] -> Monitor String) -> IO () -> (String -> IO ()) -> IO () runMBD :: [String] -> IO MConfig -> ([String] -> Monitor String) -> IO () -> ([String] -> Monitor Bool) -> (String -> IO ()) -> IO () runML :: [String] -> IO MConfig -> ([String] -> Monitor String) -> (IO () -> IO ()) -> (String -> IO ()) -> IO () runMLD :: [String] -> IO MConfig -> ([String] -> Monitor String) -> (IO () -> IO ()) -> ([String] -> Monitor Bool) -> (String -> IO ()) -> IO () -- | Get all argument values out of a list of arguments. getArgvs :: [String] -> [String] doArgs :: [String] -> ([String] -> Monitor String) -> ([String] -> Monitor Bool) -> Monitor String computeMonitorConfig :: [String] -> IO MConfig -> IO MonitorConfig pluginOptions :: [OptDescr Opts] -- | Utilities used by xmobar's monitors module Xmobar.Plugins.Monitors.Common type IconPattern = Int -> String parseIconPattern :: String -> IconPattern padString :: Int -> Int -> String -> Bool -> String -> String -> String colorizeString :: (Num a, Ord a) => a -> String -> Monitor String showWithPadding :: String -> Monitor String showWithColors :: (Num a, Ord a) => (a -> String) -> a -> Monitor String showWithColors' :: (Num a, Ord a) => String -> a -> Monitor String showPercentWithColors :: Float -> Monitor String showPercentsWithColors :: [Float] -> Monitor [String] showPercentBar :: Float -> Float -> Monitor String showVerticalBar :: Float -> Float -> Monitor String showIconPattern :: Maybe IconPattern -> Float -> Monitor String showLogBar :: Float -> Float -> Monitor String showLogVBar :: Float -> Float -> Monitor String showLogIconPattern :: Maybe IconPattern -> Float -> Float -> Monitor String showWithUnits :: Int -> Int -> Float -> String takeDigits :: Int -> Float -> Float showDigits :: RealFloat a => Int -> a -> String floatToPercent :: Float -> Monitor String parseFloat :: String -> Float parseInt :: String -> Int stringParser :: Pos -> ByteString -> String pShowPercentsWithColors :: MonadIO m => MonitorConfig -> [Float] -> m [String] pShowPercentBar :: MonadIO m => MonitorConfig -> Float -> Float -> m String pShowVerticalBar :: MonadIO m => MonitorConfig -> Float -> Float -> m String pShowIconPattern :: Maybe IconPattern -> Float -> IO String pShowPercentWithColors :: MonadIO m => MonitorConfig -> Float -> m String runP :: Parser [a] -> String -> IO [a] skipRestOfLine :: Parser Char getNumbers :: Parser Float getNumbersAsString :: Parser String getAllBut :: String -> Parser String getAfterString :: String -> Parser String skipTillString :: String -> Parser String -- | Takes a list of strings that represent the values of the exported -- keys. The strings are joined with the exported keys to form a map to -- be combined with combine to the parsed template. Returns the -- final output of the monitor, trimmed to MaxTotalWidth if that -- configuration value is positive. parseTemplate :: [String] -> Monitor String -- | Parses the template given to it with a map of export values and -- combines them parseTemplate' :: String -> Map String String -> Monitor String -- | Try to parse arguments from the config file and apply them to Options. parseOptsWith :: [OptDescr (opts -> opts)] -> opts -> [String] -> IO opts -- | Combines the template parsers templateParser :: Parser [(String, String, String)] runExportParser :: [String] -> IO [(String, [(String, String, String)])] runTemplateParser :: MonitorConfig -> IO [(String, String, String)] pureParseTemplate :: MonitorConfig -> TemplateInput -> IO String checkedDataRetrieval :: (Ord a, Num a) => String -> [[String]] -> Maybe (String, String -> Int) -> (Double -> a) -> (a -> String) -> Monitor String -- | A cpu monitor for Xmobar module Xmobar.Plugins.Monitors.Cpu startCpu :: [String] -> Int -> (String -> IO ()) -> IO () runCpu :: CpuArguments -> IO String cpuConfig :: IO MConfig type CpuDataRef = IORef [Int] data CpuOpts data CpuArguments parseCpu :: CpuDataRef -> IO CpuData getArguments :: [String] -> IO CpuArguments instance GHC.Show.Show Xmobar.Plugins.Monitors.Cpu.ShouldCompute instance GHC.Classes.Ord Xmobar.Plugins.Monitors.Cpu.ShouldCompute instance GHC.Classes.Eq Xmobar.Plugins.Monitors.Cpu.ShouldCompute instance GHC.Show.Show Xmobar.Plugins.Monitors.Cpu.Field instance GHC.Classes.Ord Xmobar.Plugins.Monitors.Cpu.Field instance GHC.Classes.Eq Xmobar.Plugins.Monitors.Cpu.Field -- | Public interface of the xmobar library module Xmobar xmobar :: Config -> IO () xmobarMain :: IO () -- | The default configuration values defaultConfig :: Config configFromArgs :: Config -> IO Config -- | Sleep for a given amount of tenths of a second. -- -- (Work around the Int max bound: since threadDelay takes an Int, it is -- not possible to set a thread delay grater than about 45 minutes. With -- a little recursion we solve the problem.) tenthSeconds :: Int -> IO () data Runnable Run :: r -> Runnable class Show e => Exec e alias :: Exec e => e -> String rate :: Exec e => e -> Int run :: Exec e => e -> IO String start :: Exec e => e -> (String -> IO ()) -> IO () trigger :: Exec e => e -> (Maybe SignalType -> IO ()) -> IO () data Command Com :: Program -> Args -> Alias -> Rate -> Command ComX :: Program -> Args -> String -> Alias -> Rate -> Command -- | The configuration data type data Config Config :: String -> [String] -> String -> String -> String -> String -> XPosition -> Int -> [Int] -> Int -> Border -> String -> Int -> Int -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> FilePath -> [Runnable] -> String -> String -> String -> Bool -> Config -- | Font [font] :: Config -> String -- | List of alternative fonts [additionalFonts] :: Config -> [String] -- | X11 WM_CLASS property value [wmClass] :: Config -> String -- | X11 WM_NAME property value [wmName] :: Config -> String -- | Backgroud color [bgColor] :: Config -> String -- | Default font color [fgColor] :: Config -> String -- | Top Bottom or Static [position] :: Config -> XPosition -- | Offset from top of window for text [textOffset] :: Config -> Int -- | List of offsets for additionalFonts [textOffsets] :: Config -> [Int] -- | Offset from top of window for icons [iconOffset] :: Config -> Int -- | NoBorder TopB BottomB or FullB [border] :: Config -> Border -- | Border color [borderColor] :: Config -> String -- | Border width [borderWidth] :: Config -> Int -- | Transparency from 0 (transparent) to 255 (opaque) [alpha] :: Config -> Int -- | Hide (Unmap) the window on initialization [hideOnStart] :: Config -> Bool -- | Tell the WM to map to all desktops [allDesktops] :: Config -> Bool -- | Needed for dock behaviour in some non-tiling WMs [overrideRedirect] :: Config -> Bool -- | Use the broadest display instead of the first one by default [pickBroadest] :: Config -> Bool -- | lower to the bottom of the window stack on initialization [lowerOnStart] :: Config -> Bool -- | Whether automatic hiding should be enabled or disabled [persistent] :: Config -> Bool -- | Root folder for icons [iconRoot] :: Config -> FilePath -- | For setting the command, the command arguments and refresh rate for -- the programs to run (optional) [commands] :: Config -> [Runnable] -- | The character to be used for indicating commands in the output -- template (default %) [sepChar] :: Config -> String -- | Separators for left, center and right text alignment [alignSep] :: Config -> String -- | The output template [template] :: Config -> String -- | Emit additional debug messages [verbose] :: Config -> Bool data XPosition Top :: XPosition TopH :: Int -> XPosition TopW :: Align -> Int -> XPosition TopSize :: Align -> Int -> Int -> XPosition TopP :: Int -> Int -> XPosition Bottom :: XPosition BottomH :: Int -> XPosition BottomP :: Int -> Int -> XPosition BottomW :: Align -> Int -> XPosition BottomSize :: Align -> Int -> Int -> XPosition Static :: Int -> XPosition [xpos, ypos, width, height] :: XPosition -> Int OnScreen :: Int -> XPosition -> XPosition data Align L :: Align R :: Align C :: Align data Border NoBorder :: Border TopB :: Border BottomB :: Border FullB :: Border TopBM :: Int -> Border BottomBM :: Int -> Border FullBM :: Int -> Border -- | Reads the configuration from a file or an error if it cannot be -- parsed. readConfig :: Config -> FilePath -> IO (Either ParseError (Config, [String])) -- | Parse the config, logging a list of fields that were missing and -- replaced by the default definition. parseConfig :: Config -> String -> Either ParseError (Config, [String]) data BufferedPipeReader BufferedPipeReader :: String -> [(Int, Bool, String)] -> BufferedPipeReader data CommandReader CommandReader :: String -> String -> CommandReader data Date Date :: String -> String -> Int -> Date date :: IORef TimeZone -> String -> IO String data EWMH EWMH :: EWMH EWMHFMT :: Component -> EWMH -- | A HandleReader displays any text received from a Handle. -- -- This is only useful if you are running xmobar from other -- Haskell code. You can create a pair of (read, write) -- Handles using createPipe. Pass the read -- Handle to HandleReader and write your desired output to the -- write Handle. -- --
-- (readHandle, writeHandle) <- createPipe
-- xmobarProcess <- forkProcess $ xmobar myConfig
-- { commands =
-- Run (HandleReader readHandle "handle") : commands myConfig
-- }
-- hPutStr writeHandle "Hello World"
--
data HandleReader
HandleReader :: Handle -> String -> HandleReader
newtype Kbd
Kbd :: [(String, String)] -> Kbd
data Locks
Locks :: Locks
-- | A MailItem is a name, an address, and a query to give to
-- notmuch.
data MailItem
MailItem :: String -> String -> String -> MailItem
-- | Display name for the item in the bar
[name] :: MailItem -> String
-- | Only check for mail sent to this address; may be the empty string to
-- query all indexed mail instead
[address] :: MailItem -> String
-- | Query to give to notmuch search
[query] :: MailItem -> String
-- | A full mail configuration.
data NotmuchMail
NotmuchMail :: String -> [MailItem] -> Int -> NotmuchMail
-- | Alias for the template string
[nmAlias] :: NotmuchMail -> String
-- | MailItems to check
[mailItems] :: NotmuchMail -> [MailItem]
-- | Update frequency (in deciseconds)
[nmRate] :: NotmuchMail -> Int
data Monitors
Network :: Interface -> Args -> Rate -> Monitors
DynNetwork :: Args -> Rate -> Monitors
BatteryP :: Args -> Args -> Rate -> Monitors
BatteryN :: Args -> Args -> Rate -> Alias -> Monitors
Battery :: Args -> Rate -> Monitors
DiskU :: DiskSpec -> Args -> Rate -> Monitors
DiskIO :: DiskSpec -> Args -> Rate -> Monitors
Thermal :: Zone -> Args -> Rate -> Monitors
ThermalZone :: ZoneNo -> Args -> Rate -> Monitors
Memory :: Args -> Rate -> Monitors
Swap :: Args -> Rate -> Monitors
Cpu :: Args -> Rate -> Monitors
MultiCpu :: Args -> Rate -> Monitors
Brightness :: Args -> Rate -> Monitors
CpuFreq :: Args -> Rate -> Monitors
CoreTemp :: Args -> Rate -> Monitors
MultiCoreTemp :: Args -> Rate -> Monitors
K10Temp :: Slot -> Args -> Rate -> Monitors
TopProc :: Args -> Rate -> Monitors
TopMem :: Args -> Rate -> Monitors
Uptime :: Args -> Rate -> Monitors
CatInt :: Int -> FilePath -> Args -> Rate -> Monitors
Weather :: Station -> Args -> Rate -> Monitors
WeatherX :: Station -> SkyConditions -> Args -> Rate -> Monitors
type Args = [String]
type Program = String
type Alias = String
type Station = String
type SkyConditions = [(String, String)]
type Zone = String
type ZoneNo = Int
type Interface = String
type Rate = Int
type DiskSpec = [(String, String)]
type Slot = String
data PipeReader
PipeReader :: String -> String -> PipeReader
data MarqueePipeReader
MarqueePipeReader :: String -> (Length, Rate, Separator) -> String -> MarqueePipeReader
data StdinReader
StdinReader :: StdinReader
UnsafeStdinReader :: StdinReader
data XMonadLog
XMonadLog :: XMonadLog
UnsafeXMonadLog :: XMonadLog
XPropertyLog :: String -> XMonadLog
UnsafeXPropertyLog :: String -> XMonadLog
NamedXPropertyLog :: String -> String -> XMonadLog
UnsafeNamedXPropertyLog :: String -> String -> XMonadLog