-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A desktop bar similar to xmobar, but with more GUI
--   
--   A somewhat fancier desktop bar than xmobar. This bar is based on
--   gtk2hs and provides several widgets (including a few graphical ones).
--   It also sports an optional snazzy system tray.
@package taffybar
@version 1.0.1


-- | This is a simple library to query the Linux UPower daemon (via DBus)
--   for battery information. Currently, it only retrieves information for
--   the first battery it finds.
module System.Information.Battery

-- | An opaque wrapper around some internal library state
data BatteryContext

-- | There are a few fields supported by UPower that aren't exposed here..
--   could be easily.
data BatteryInfo
BatteryInfo :: Text -> Text -> Text -> Text -> BatteryType -> Bool -> Bool -> Bool -> Bool -> Double -> Double -> Double -> Double -> Double -> Double -> Int64 -> Int64 -> Double -> Bool -> BatteryState -> Bool -> Double -> BatteryTechnology -> BatteryInfo
[batteryNativePath] :: BatteryInfo -> Text
[batteryVendor] :: BatteryInfo -> Text
[batteryModel] :: BatteryInfo -> Text
[batterySerial] :: BatteryInfo -> Text
[batteryType] :: BatteryInfo -> BatteryType
[batteryPowerSupply] :: BatteryInfo -> Bool
[batteryHasHistory] :: BatteryInfo -> Bool
[batteryHasStatistics] :: BatteryInfo -> Bool
[batteryOnline] :: BatteryInfo -> Bool
[batteryEnergy] :: BatteryInfo -> Double
[batteryEnergyEmpty] :: BatteryInfo -> Double
[batteryEnergyFull] :: BatteryInfo -> Double
[batteryEnergyFullDesign] :: BatteryInfo -> Double
[batteryEnergyRate] :: BatteryInfo -> Double
[batteryVoltage] :: BatteryInfo -> Double
[batteryTimeToEmpty] :: BatteryInfo -> Int64
[batteryTimeToFull] :: BatteryInfo -> Int64
[batteryPercentage] :: BatteryInfo -> Double
[batteryIsPresent] :: BatteryInfo -> Bool
[batteryState] :: BatteryInfo -> BatteryState
[batteryIsRechargable] :: BatteryInfo -> Bool
[batteryCapacity] :: BatteryInfo -> Double
[batteryTechnology] :: BatteryInfo -> BatteryTechnology
data BatteryState
BatteryStateUnknown :: BatteryState
BatteryStateCharging :: BatteryState
BatteryStateDischarging :: BatteryState
BatteryStateEmpty :: BatteryState
BatteryStateFullyCharged :: BatteryState
BatteryStatePendingCharge :: BatteryState
BatteryStatePendingDischarge :: BatteryState
data BatteryTechnology
BatteryTechnologyUnknown :: BatteryTechnology
BatteryTechnologyLithiumIon :: BatteryTechnology
BatteryTechnologyLithiumPolymer :: BatteryTechnology
BatteryTechnologyLithiumIronPhosphate :: BatteryTechnology
BatteryTechnologyLeadAcid :: BatteryTechnology
BatteryTechnologyNickelCadmium :: BatteryTechnology
BatteryTechnologyNickelMetalHydride :: BatteryTechnology
data BatteryType
BatteryTypeUnknown :: BatteryType
BatteryTypeLinePower :: BatteryType
BatteryTypeBatteryType :: BatteryType
BatteryTypeUps :: BatteryType
BatteryTypeMonitor :: BatteryType
BatteryTypeMouse :: BatteryType
BatteryTypeKeyboard :: BatteryType
BatteryTypePda :: BatteryType
BatteryTypePhone :: BatteryType

-- | Construct a battery context for every battery in the system. This
--   could fail if the UPower daemon is not running. The contexts can be
--   used to get actual battery state with <a>getBatteryInfo</a>.
batteryContextsNew :: IO [BatteryContext]

-- | Query the UPower daemon about information on a specific battery. If
--   some fields are not actually present, they may have bogus values here.
--   Don't bet anything critical on it.
getBatteryInfo :: BatteryContext -> IO (Maybe BatteryInfo)
instance GHC.Enum.Enum System.Information.Battery.BatteryTechnology
instance GHC.Classes.Eq System.Information.Battery.BatteryTechnology
instance GHC.Classes.Ord System.Information.Battery.BatteryTechnology
instance GHC.Show.Show System.Information.Battery.BatteryTechnology
instance GHC.Enum.Enum System.Information.Battery.BatteryState
instance GHC.Classes.Eq System.Information.Battery.BatteryState
instance GHC.Classes.Ord System.Information.Battery.BatteryState
instance GHC.Show.Show System.Information.Battery.BatteryState
instance GHC.Enum.Enum System.Information.Battery.BatteryType
instance GHC.Classes.Eq System.Information.Battery.BatteryType
instance GHC.Classes.Ord System.Information.Battery.BatteryType
instance GHC.Show.Show System.Information.Battery.BatteryType

module System.Information.CPU

-- | Return a pair with (user time, system time, total time) (read from
--   <i>proc</i>stat). The function waits for 50 ms between samples.
cpuLoad :: IO (Double, Double, Double)

module System.Information.Memory
data MemoryInfo
MemoryInfo :: Double -> Double -> Double -> Double -> Double -> Double -> Double -> Double -> Double -> Double -> Double -> Double -> MemoryInfo
[memoryTotal] :: MemoryInfo -> Double
[memoryFree] :: MemoryInfo -> Double
[memoryBuffer] :: MemoryInfo -> Double
[memoryCache] :: MemoryInfo -> Double
[memorySwapTotal] :: MemoryInfo -> Double
[memorySwapFree] :: MemoryInfo -> Double
[memorySwapUsed] :: MemoryInfo -> Double
[memorySwapUsedRatio] :: MemoryInfo -> Double
[memoryAvailable] :: MemoryInfo -> Double
[memoryRest] :: MemoryInfo -> Double
[memoryUsed] :: MemoryInfo -> Double
[memoryUsedRatio] :: MemoryInfo -> Double
parseMeminfo :: IO MemoryInfo


module System.Information.SafeX11
safeXGetWMHints :: Display -> Window -> IO (Ptr WMHints)
safeXGetWindowProperty :: Display -> Window -> Atom -> CLong -> CLong -> Bool -> Atom -> Ptr Atom -> Ptr CInt -> Ptr CULong -> Ptr CULong -> Ptr (Ptr CUChar) -> IO Status
rawGetWindowPropertyBytes :: Storable a => Int -> Display -> Atom -> Window -> IO (Maybe (ForeignPtr a, Int))
data SafeX11Exception
SafeX11Exception :: SafeX11Exception
data IORequest
IORequest :: IO a -> Chan (Either SafeX11Exception a) -> IORequest
[ioAction] :: IORequest -> IO a
[ioResponse] :: IORequest -> Chan (Either SafeX11Exception a)
requestQueue :: Chan IORequest
x11Thread :: ThreadId
withErrorHandler :: XErrorHandler -> IO a -> IO a
startHandlingX11Requests :: IO ()
handleX11Requests :: IO ()
postX11RequestSync :: IO a -> IO (Either SafeX11Exception a)
postX11RequestSyncDef :: a -> IO a -> IO a
rawGetWindowProperty :: Storable a => Int -> Display -> Atom -> Window -> IO (Maybe [a])
getWindowProperty8 :: Display -> Atom -> Window -> IO (Maybe [CChar])
getWindowProperty16 :: Display -> Atom -> Window -> IO (Maybe [CShort])
getWindowProperty32 :: Display -> Atom -> Window -> IO (Maybe [CLong])
getWMHints :: Display -> Window -> IO WMHints
safeGetGeometry :: Display -> Drawable -> IO (Window, Position, Position, Dimension, Dimension, Dimension, CInt)
outParameters7 :: (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g) => (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> Ptr d -> Ptr e -> Ptr f -> Ptr g -> IO r) -> IO (a, b, c, d, e, f, g)
xGetGeometry :: Display -> Drawable -> Ptr Window -> Ptr Position -> Ptr Position -> Ptr Dimension -> Ptr Dimension -> Ptr Dimension -> Ptr CInt -> IO Status
instance GHC.Classes.Eq System.Information.SafeX11.SafeX11Exception
instance GHC.Show.Show System.Information.SafeX11.SafeX11Exception
instance GHC.Show.Show Graphics.X11.Xlib.Extras.ErrorEvent
instance GHC.Exception.Exception System.Information.SafeX11.SafeX11Exception


-- | Generic code to poll any of the many data files maintained by the
--   kernel in POSIX systems. Provides methods for applying a custom
--   parsing function to the contents of the file and to calculate
--   differentials across one or more values provided via the file.
module System.Information.StreamInfo

-- | Apply the given parser function to the file under the given path to
--   produce a lookup map, then use the given selector as key to extract
--   from it the desired value.
getParsedInfo :: FilePath -> (String -> [(String, [a])]) -> String -> IO [a]

-- | Probe the given action and return the relative variation of each of
--   the obtained values against the whole, where the whole is calculated
--   as the sum of all the values in the probe.
getLoad :: (Integral a, RealFloat b) => b -> IO [a] -> IO [b]

-- | Similar to getLoad, but execute the given action only once and use the
--   given IORef to calculate the result and to save the current value, so
--   it can be reused in the next call.
getAccLoad :: (Integral a, RealFloat b) => IORef [a] -> IO [a] -> IO [b]

-- | Probe the given action and, interpreting the result as a variation in
--   time, return the speed of change of its values.
getTransfer :: (Integral a, RealFloat b) => b -> IO [a] -> IO [b]


-- | Provides information about network traffic over selected interfaces,
--   obtained from parsing the <tt>/proc/net/dev</tt> file using some of
--   the facilities provided by the <a>System.Information.StreamInfo</a>
--   module.
module System.Information.Network

-- | Returns a two-element list containing the current number of bytes
--   received and transmitted via the given network interface (e.g.
--   "wlan0"), according to the contents of the <tt>/proc/dev/net</tt>
--   file.
getNetInfo :: String -> IO (Maybe [Int])


-- | Provides information about read/write operations in a given disk or
--   partition, obtained from parsing the <tt>/proc/diskstats</tt> file
--   with some of the facilities included in the
--   <a>System.Information.StreamInfo</a> module.
module System.Information.DiskIO

-- | Returns a two-element list containing the speed of transfer for read
--   and write operations performed in the given disk/partition (e.g.
--   "sda", "sda1").
getDiskTransfer :: String -> IO [Double]


-- | Provides information about used CPU times, obtained from parsing the
--   <tt>/proc/stat</tt> file using some of the facilities included in the
--   <a>System.Information.StreamInfo</a> module. And also provides
--   information about the temperature of cores. (Now supports only
--   physical cpu).
module System.Information.CPU2

-- | Returns a two-element list containing relative system and user times
--   calculated using two almost simultaneous samples of the
--   <tt>/proc/stat</tt> file for the given core (or all of them
--   aggregated, if "cpu" is passed).
getCPULoad :: String -> IO [Double]

-- | Returns a list of 5 to 7 elements containing all the values available
--   for the given core (or all of them aggregated, if "cpu" is passed).
getCPUInfo :: String -> IO [Int]

-- | Returns a list containing temperatures of user given cpu cores. Use
--   ["cpu1", "cpu2".."cpuN"] to get temperature of exact cores. Use
--   ["cpu0"] to get common temperature.
getCPUTemp :: [String] -> IO [Int]

module System.Information.Volume

-- | Gets volume of a channel of a mixer
getVolume :: String -> String -> IO Integer

-- | Sets volume of a channel of a mixer
setVolume :: String -> String -> Double -> IO ()


-- | Low-level functions to access data provided by the X11 desktop via
--   window properties. One of them (<a>getVisibleTags</a>) depends on the
--   PagerHints hook being installed in your <tt>~/.xmonad/xmonad.hs</tt>
--   configuration:
--   
--   <pre>
--   import System.Taffybar.Hooks.PagerHints (pagerHints)
--   
--   main = xmonad $ ewmh $ pagerHints $ ...
--   </pre>
module System.Information.X11DesktopInfo
data X11Context
X11Context :: Display -> Window -> X11Context
[contextDisplay] :: X11Context -> Display
[_contextRoot] :: X11Context -> Window
type X11Property a = ReaderT X11Context IO a
type X11Window = Window

-- | Put the current display and root window objects inside a Reader
--   transformer for further computation.
withDefaultCtx :: X11Property a -> IO a

-- | Build a new X11Context containing the current X11 display and its root
--   window.
getDefaultCtx :: IO X11Context
getWindowState :: X11Window -> [String] -> X11Property [String]
getWindowStateProperty :: X11Window -> String -> X11Property Bool

-- | Retrieve the property of the given window (or the root window, if
--   Nothing) with the given name as a value of type Int. If that property
--   hasn't been set, then return -1.
readAsInt :: Maybe X11Window -> String -> X11Property Int

-- | Retrieve the property of the given window (or the root window, if
--   Nothing) with the given name as a list of Ints. If that property
--   hasn't been set, then return an empty list.
readAsListOfInt :: Maybe X11Window -> String -> X11Property [Int]

-- | Retrieve the property of the given window (or the root window, if
--   Nothing) with the given name as a String. If the property hasn't been
--   set, then return an empty string.
readAsString :: Maybe X11Window -> String -> X11Property String

-- | Retrieve the property of the given window (or the root window, if
--   Nothing) with the given name as a list of Strings. If the property
--   hasn't been set, then return an empty list.
readAsListOfString :: Maybe X11Window -> String -> X11Property [String]

-- | Retrieve the property of the given window (or the root window, if
--   Nothing) with the given name as a list of X11 Window IDs. If the
--   property hasn't been set, then return an empty list.
readAsListOfWindow :: Maybe X11Window -> String -> X11Property [X11Window]

-- | Determine whether the "urgent" flag is set in the WM_HINTS of the
--   given window.
isWindowUrgent :: X11Window -> X11Property Bool

-- | Retrieve the value of the special _XMONAD_VISIBLE_WORKSPACES hint set
--   by the PagerHints hook provided by Taffybar (see module documentation
--   for instructions on how to do this), or an empty list of strings if
--   the PagerHints hook is not available.
getVisibleTags :: X11Property [String]

-- | Return the Atom with the given name.
getAtom :: String -> X11Property Atom
getDisplay :: X11Property Display

-- | Spawn a new thread and listen inside it to all incoming events,
--   invoking the given function to every event of type
--   <tt>MapNotifyEvent</tt> that arrives, and subscribing to all events of
--   this type emitted by newly created windows.
eventLoop :: (Event -> IO ()) -> X11Property ()

-- | Emit a "command" event with one argument for the X server. This is
--   used to send events that can be received by event hooks in the XMonad
--   process and acted upon in that context.
sendCommandEvent :: Atom -> Atom -> X11Property ()

-- | Similar to <a>sendCommandEvent</a>, but with an argument of type
--   Window.
sendWindowEvent :: Atom -> X11Window -> X11Property ()
postX11RequestSyncProp :: X11Property a -> a -> X11Property a

-- | Get the index of the primary monitor as set and ordered by Xrandr.
getPrimaryOutputNumber :: X11Property (Maybe Int)


-- | Functions to access data provided by the X11 desktop via EWHM hints.
--   This module requires that the EwmhDesktops hook from the XMonadContrib
--   project be installed in your <tt>~/.xmonad/xmonad.hs</tt>
--   configuration:
--   
--   <pre>
--   import XMonad
--   import XMonad.Hooks.EwmhDesktops (ewmh)
--   
--   main = xmonad $ ewmh $ ...
--   </pre>
module System.Information.EWMHDesktopInfo
type X11Window = Window

-- | Convenience alias for a pair of the form (props, window), where props
--   is a tuple of the form (workspace index, window title, window class),
--   and window is the internal ID of an open window.
type X11WindowHandle = ((WorkspaceIdx, String, String), X11Window)
newtype WorkspaceIdx
WSIdx :: Int -> WorkspaceIdx
data EWMHIcon
EWMHIcon :: Int -> Int -> Ptr PixelsWordType -> EWMHIcon
[width] :: EWMHIcon -> Int
[height] :: EWMHIcon -> Int
[pixelsARGB] :: EWMHIcon -> Ptr PixelsWordType

-- | Put the current display and root window objects inside a Reader
--   transformer for further computation.
withDefaultCtx :: X11Property a -> IO a

-- | Determine whether the "urgent" flag is set in the WM_HINTS of the
--   given window.
isWindowUrgent :: X11Window -> X11Property Bool

-- | Retrieve the index of the current workspace in the desktop, starting
--   from 0.
getCurrentWorkspace :: X11Property WorkspaceIdx

-- | Retrieve the indexes of all currently visible workspaces with the
--   active workspace at the head of the list.
getVisibleWorkspaces :: X11Property [WorkspaceIdx]

-- | Return a list with the names of all the workspaces currently
--   available.
getWorkspaceNames :: X11Property [(WorkspaceIdx, String)]

-- | Ask the window manager to switch to the workspace with the given
--   index, starting from 0.
switchToWorkspace :: WorkspaceIdx -> X11Property ()

-- | Move one workspace up or down from the current workspace
switchOneWorkspace :: Bool -> Int -> X11Property ()

-- | Get the title of the given X11 window.
getWindowTitle :: X11Window -> X11Property String

-- | Get the class of the given X11 window.
getWindowClass :: X11Window -> X11Property String

-- | Get list of icon ARGB data from EWMH
getWindowIcons :: X11Window -> X11Property [EWMHIcon]

-- | Get the title of the currently focused window.
getActiveWindowTitle :: X11Property String

-- | Return a list of all windows
getWindows :: X11Property [X11Window]

-- | Return a list of X11 window handles, one for each window open. Refer
--   to the documentation of <a>X11WindowHandle</a> for details on the
--   structure returned.
getWindowHandles :: X11Property [X11WindowHandle]

-- | Return the index (starting from 0) of the workspace on which the given
--   window is being displayed.
getWorkspace :: X11Window -> X11Property WorkspaceIdx

-- | Ask the window manager to give focus to the given window.
focusWindow :: X11Window -> X11Property ()
instance GHC.Classes.Eq System.Information.EWMHDesktopInfo.EWMHIcon
instance GHC.Show.Show System.Information.EWMHDesktopInfo.EWMHIcon
instance GHC.Classes.Eq System.Information.EWMHDesktopInfo.WorkspaceIdx
instance GHC.Classes.Ord System.Information.EWMHDesktopInfo.WorkspaceIdx
instance GHC.Read.Read System.Information.EWMHDesktopInfo.WorkspaceIdx
instance GHC.Show.Show System.Information.EWMHDesktopInfo.WorkspaceIdx


-- | This widget listens on DBus for freedesktop notifications
--   (http:/<i>developer.gnome.org</i>notification-spec/). Currently it is
--   somewhat ugly, but the format is somewhat configurable. A visual
--   overhaul of the widget is coming.
--   
--   The widget only displays one notification at a time and notifications
--   are cancellable.
module System.Taffybar.FreedesktopNotifications

-- | A simple structure representing a Freedesktop notification
data Notification
Notification :: Text -> Word32 -> Text -> Text -> Maybe Int32 -> Word32 -> Notification
[noteAppName] :: Notification -> Text
[noteReplaceId] :: Notification -> Word32
[noteSummary] :: Notification -> Text
[noteBody] :: Notification -> Text
[noteExpireTimeout] :: Notification -> Maybe Int32
[noteId] :: Notification -> Word32
data NotificationConfig
NotificationConfig :: Maybe Int32 -> Int -> [Notification] -> String -> NotificationConfig

-- | Maximum time that a notification will be displayed (in seconds).
--   Default: None
[notificationMaxTimeout] :: NotificationConfig -> Maybe Int32

-- | Maximum length displayed, in characters. Default: 100
[notificationMaxLength] :: NotificationConfig -> Int

-- | Function used to format notifications, takes the notifications from
--   first to last
[notificationFormatter] :: NotificationConfig -> [Notification] -> String

-- | Create a new notification area with the given configuration.
notifyAreaNew :: NotificationConfig -> IO Widget

-- | The default formatter is one of * Summary : Body * Summary * (N)
--   Summary : Body * (N) Summary depending on the presence of a
--   notification body, and where N is the number of queued notifications.
defaultNotificationConfig :: NotificationConfig
instance GHC.Classes.Eq System.Taffybar.FreedesktopNotifications.Notification
instance GHC.Show.Show System.Taffybar.FreedesktopNotifications.Notification


-- | Complements the <a>XMonad.Hooks.EwmhDesktops</a> with two additional
--   hints not contemplated by the EWMH standard:
--   
--   <ul>
--   <li><i><tt>_XMONAD_CURRENT_LAYOUT</tt></i> Contains a UTF-8 string
--   with the name of the windows layout currently used in the active
--   workspace.</li>
--   <li><i><tt>_XMONAD_VISIBLE_WORKSPACES</tt></i> Contains a list of
--   UTF-8 strings with the names of all the workspaces that are currently
--   showed in a secondary display, or an empty list if in the current
--   installation there's only one monitor.</li>
--   </ul>
--   
--   The first hint can be set directly on the root window of the default
--   display, or indirectly via X11 events with an atom of the same name.
--   This allows both to track any changes that occur in the layout of the
--   current workspace, as well as to have it changed automatically by just
--   sending a custom event to the hook.
--   
--   The second one should be considered read-only, and is set every time
--   XMonad calls its log hooks.
module System.Taffybar.Hooks.PagerHints

-- | Add support for the "Current Layout" and "Visible Workspaces" custom
--   hints to the given config.
pagerHints :: XConfig a -> XConfig a


module System.Taffybar.IconImages
type ColorRGBA = (Word8, Word8, Word8, Word8)

-- | Take the passed in pixbuf and ensure its scaled square.
scalePixbuf :: Int -> Pixbuf -> IO Pixbuf

-- | Create a pixbuf from the pixel data in an EWMHIcon.
pixBufFromEWMHIcon :: EWMHIcon -> IO Pixbuf

-- | Convert a C array of integer pixels in the ARGB format to the ABGR
--   format.
pixelsARGBToBytesABGR :: (Storable a, Bits a, Num a, Integral a) => Ptr a -> Int -> IO (Ptr CUChar)

-- | Create a pixbuf with the indicated RGBA color.
pixBufFromColor :: Int -> ColorRGBA -> IO Pixbuf

-- | Create a pixbuf from a file and scale it to be square.
pixBufFromFile :: Int -> FilePath -> IO Pixbuf
selectEWMHIcon :: Int -> [EWMHIcon] -> EWMHIcon


-- | This is a "Now Playing"-style widget that listens for MPRIS events on
--   DBus. Various media players implement this. This widget only works
--   with version 1 of the MPRIS protocol
--   (http:/<i>www.mpris.org</i>1.0/spec.html). Support for version 2 will
--   be in a separate widget.
module System.Taffybar.MPRIS
data TrackInfo
TrackInfo :: Maybe String -> Maybe String -> Maybe String -> TrackInfo

-- | Artist name, if available.
[trackArtist] :: TrackInfo -> Maybe String

-- | Track name, if available.
[trackTitle] :: TrackInfo -> Maybe String

-- | Album name, if available.
[trackAlbum] :: TrackInfo -> Maybe String
data MPRISConfig
MPRISConfig :: TrackInfo -> String -> MPRISConfig

-- | Calculate a label to display.
[trackLabel] :: MPRISConfig -> TrackInfo -> String
defaultMPRISConfig :: MPRISConfig
mprisNew :: MPRISConfig -> IO Widget


-- | This is a "Now Playing"-style widget that listens for MPRIS events on
--   DBus. Various media players implement this. This widget works with
--   version 2 of the MPRIS protocol
--   (http:/<i>www.mpris.org</i>2.0/spec.html).
module System.Taffybar.MPRIS2
mpris2New :: IO Widget


-- | Common support for pager widgets. This module does not provide itself
--   any widgets, but implements an event dispatcher on which widgets can
--   subscribe the desktop events they're interested in, as well as common
--   configuration facilities.
--   
--   N.B. If you're just looking for a drop-in replacement for the
--   <a>System.Taffybar.XMonadLog</a> widget that is clickable and doesn't
--   require DBus, you may want to see first
--   <a>System.Taffybar.TaffyPager</a>.
--   
--   You need only one Pager component to instantiate any number of pager
--   widgets:
--   
--   <pre>
--   pager &lt;- pagerNew defaultPagerConfig
--   
--   let wss = wspaceSwitcherNew pager  -- Workspace Switcher widget
--       los = layoutSwitcherNew pager  -- Layout Switcher widget
--       wnd = windowSwitcherNew pager  -- Window Switcher widget
--   </pre>
module System.Taffybar.Pager

-- | Structure containing the state of the Pager.
data Pager
Pager :: PagerConfig -> SubscriptionList -> IORef X11Context -> Pager

-- | the configuration settings.
[config] :: Pager -> PagerConfig

-- | functions to apply on incoming events depending on their types.
[clients] :: Pager -> SubscriptionList
[pagerX11ContextVar] :: Pager -> IORef X11Context

-- | Structure contanining functions to customize the pretty printing of
--   different widget elements.
data PagerConfig
PagerConfig :: String -> String -> String -> String -> String -> IO String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> Bool -> Int -> Bool -> Bool -> Int -> Bool -> Bool -> String -> String -> Maybe FilePath -> Map WorkspaceIdx String -> X11WindowHandle -> String -> PagerConfig

-- | the name of the active window.
[activeWindow] :: PagerConfig -> String -> String

-- | the currently active layout.
[activeLayout] :: PagerConfig -> String -> String

-- | IO action to modify active layout.
[activeLayoutIO] :: PagerConfig -> String -> IO String

-- | the currently active workspace.
[activeWorkspace] :: PagerConfig -> String -> String

-- | inactive workspace with windows.
[hiddenWorkspace] :: PagerConfig -> String -> String

-- | inactive workspace with no windows.
[emptyWorkspace] :: PagerConfig -> String -> String

-- | all other visible workspaces (Xinerama or XRandR).
[visibleWorkspace] :: PagerConfig -> String -> String

-- | workspaces containing windows with the urgency hint set.
[urgentWorkspace] :: PagerConfig -> String -> String

-- | separator to use between desktop widgets in <tt>TaffyPager</tt>.
[widgetSep] :: PagerConfig -> String

-- | wrap workspace buttons in a frame
[workspaceBorder] :: PagerConfig -> Bool

-- | space in pixels between workspace buttons
[workspaceGap] :: PagerConfig -> Int

-- | pad workspace name in button
[workspacePad] :: PagerConfig -> Bool

-- | use images in the workspace switcher
[useImages] :: PagerConfig -> Bool

-- | image height and width in pixels
[imageSize] :: PagerConfig -> Int

-- | fill empty images instead of clearing them
[fillEmptyImages] :: PagerConfig -> Bool

-- | get custom icon based on: has-EWMH-icon, window-title, window-class
[customIcon] :: PagerConfig -> Bool -> String -> String -> Maybe FilePath

-- | title windows for WindowSwitcher
[windowSwitcherFormatter] :: PagerConfig -> Map WorkspaceIdx String -> X11WindowHandle -> String
type PagerIO a = ReaderT Pager IO a

-- | Default pretty printing options.
defaultPagerConfig :: PagerConfig

-- | Creates a new Pager component (wrapped in the IO Monad) that can be
--   used by widgets for subscribing X11 events.
pagerNew :: PagerConfig -> IO Pager

-- | Registers the given Listener as a subscriber of events of the given
--   type: whenever a new event of the type with the given name arrives to
--   the Pager, it will execute Listener on it.
subscribe :: Pager -> Listener -> String -> IO ()

-- | Creates markup with the given foreground and background colors and the
--   given contents.
colorize :: String -> String -> String -> String
liftPagerX11 :: X11Property a -> PagerIO a
liftPagerX11Def :: a -> X11Property a -> PagerIO a
runWithPager :: Pager -> X11Property a -> IO a

-- | Limit a string to a certain length, adding "..." if truncated.
shorten :: Int -> String -> String

-- | Wrap the given string in the given delimiters.
wrap :: String -> String -> String -> String

-- | Escape strings so that they can be safely displayed by Pango in the
--   bar widget
escape :: String -> String


-- | The main module of Taffybar
module System.Taffybar
data TaffybarConfig
TaffybarConfig :: Int -> Int -> TaffybarConfigEQ -> IO (Int -> Maybe TaffybarConfigEQ) -> IO () -> IO () -> Int -> Int -> Position -> Int -> Maybe String -> [IO Widget] -> [IO Widget] -> TaffybarConfig

-- | The screen number to run the bar on (default is almost always fine)
[screenNumber] :: TaffybarConfig -> Int

-- | The xinerama/xrandr monitor number to put the bar on (default: 0)
[monitorNumber] :: TaffybarConfig -> Int

-- | Provides a way to specify which screens taffybar should appear on.
[getMonitorConfig] :: TaffybarConfig -> TaffybarConfigEQ -> IO (Int -> Maybe TaffybarConfigEQ)

-- | A function providing a way to call back in to taffybar to refresh its
--   configs/open closed state on each monitor.
[startRefresher] :: TaffybarConfig -> IO () -> IO ()

-- | Number of pixels to reserve for the bar (default: 25 pixels)
[barHeight] :: TaffybarConfig -> Int

-- | Number of additional pixels to reserve for the bar strut (default: 0)
[barPadding] :: TaffybarConfig -> Int

-- | The position of the bar on the screen (default: Top)
[barPosition] :: TaffybarConfig -> Position

-- | The number of pixels between widgets
[widgetSpacing] :: TaffybarConfig -> Int

-- | Used by the application
[errorMsg] :: TaffybarConfig -> Maybe String

-- | Widgets that are packed in order at the left end of the bar
[startWidgets] :: TaffybarConfig -> [IO Widget]

-- | Widgets that are packed from right-to-left in the bar
[endWidgets] :: TaffybarConfig -> [IO Widget]
type TaffybarConfigEQ = (TaffybarConfig, StableName TaffybarConfig)

-- | The entry point of the application. Feed it a custom config.
defaultTaffybar :: TaffybarConfig -> IO ()

-- | The default configuration gives an empty bar 25 pixels high on monitor
--   0.
defaultTaffybarConfig :: TaffybarConfig
data Position
Top :: Position
Bottom :: Position
taffybarMain :: TaffybarConfig -> IO ()
allMonitors :: TaffybarConfigEQ -> IO (Int -> Maybe TaffybarConfigEQ)
useMonitorNumber :: TaffybarConfigEQ -> IO (Int -> Maybe TaffybarConfigEQ)
realMain :: TaffybarConfig -> IO ()

-- | Use the primary monitor as set by Xrandr.
usePrimaryMonitor :: TaffybarConfigEQ -> IO (Int -> Maybe TaffybarConfigEQ)
instance GHC.Classes.Eq System.Taffybar.Position
instance GHC.Show.Show System.Taffybar.Position


-- | This is a very basic system tray widget. That said, it works very well
--   since it is based on eggtraymanager.
module System.Taffybar.Systray
systrayNew :: IO Widget


-- | This module provides a dbus interface that allows users to toggle the
--   display of taffybar on each monitor while it is running.
module System.Taffybar.ToggleMonitor
handleToggleRequests :: MVar (Map Int Bool) -> IO () -> IO ()
toggleableMonitors :: MVar (Map Int Bool) -> TaffybarConfigEQ -> IO (Int -> Maybe TaffybarConfigEQ)
withToggleSupport :: TaffybarConfig -> IO ()


-- | MenuWidget provides a hierachical GTK menu containing all applicable
--   desktop entries found on the system. The menu is built according to
--   the version 1.1 of the XDG "Desktop Menu Specification", see
--   <a>https://specifications.freedesktop.org/menu-spec/menu-spec-1.1.html</a>
module System.Taffybar.Menu.MenuWidget

-- | Create a new XDG Menu Widget.
menuWidgetNew :: Maybe String -> IO Widget


-- | This is a simple static image widget, and a polling image widget that
--   updates its contents by calling a callback at a set interval.
module System.Taffybar.Widgets.Icon

-- | Create a new widget that displays a static image
--   
--   <pre>
--   iconImageWidgetNew path
--   </pre>
--   
--   returns a widget with icon at <tt>path</tt>.
iconImageWidgetNew :: FilePath -> IO Widget

-- | Create a new widget that updates itself at regular intervals. The
--   function
--   
--   <pre>
--   pollingIconImageWidgetNew path interval cmd
--   </pre>
--   
--   returns a widget with initial icon at <tt>path</tt>. The widget forks
--   a thread to update its contents every <tt>interval</tt> seconds. The
--   command should return a FilePath of a valid icon.
--   
--   If the IO action throws an exception, it will be swallowed and the
--   label will not update until the update interval expires.
pollingIconImageWidgetNew :: FilePath -> Double -> IO FilePath -> IO Widget


-- | This is a simple text widget that updates its contents by calling a
--   callback at a set interval.
module System.Taffybar.Widgets.PollingLabel

-- | Create a new widget that updates itself at regular intervals. The
--   function
--   
--   <pre>
--   pollingLabelNew initialString cmd interval
--   </pre>
--   
--   returns a widget with initial text <tt>initialString</tt>. The widget
--   forks a thread to update its contents every <tt>interval</tt> seconds.
--   The command should return a string with any HTML entities escaped.
--   This is not checked by the function, since Pango markup shouldn't be
--   escaped. Proper input sanitization is up to the caller.
--   
--   If the IO action throws an exception, it will be swallowed and the
--   label will not update until the update interval expires.
pollingLabelNew :: String -> Double -> IO String -> IO Widget
pollingLabelNewWithTooltip :: String -> Double -> IO (String, Maybe String) -> IO Widget


-- | This module defines a simple textual weather widget that polls NOAA
--   for weather data. To find your weather station, you can use
--   
--   <a>http://www.nws.noaa.gov/tg/siteloc.php</a>
--   
--   For example, Madison, WI is KMSN.
--   
--   NOAA provides several pieces of information in each request; you can
--   control which pieces end up in your weather widget by providing a
--   _template_ that is filled in with the current information. The
--   template is just a <a>String</a> with variables between dollar signs.
--   The variables will be substituted with real data by the widget.
--   Example:
--   
--   <pre>
--   let wcfg = (defaultWeatherConfig "KMSN") { weatherTemplate = "$tempC$ C @ $humidity$" }
--       weatherWidget = weatherNew wcfg 10
--   </pre>
--   
--   This example makes a new weather widget that checks the weather at
--   KMSN (Madison, WI) every 10 minutes, and displays the results in
--   Celcius.
--   
--   Available variables:
--   
--   <ul>
--   <li><i><tt>stationPlace</tt></i> The name of the weather station</li>
--   <li><i><tt>stationState</tt></i> The state that the weather station is
--   in</li>
--   <li><i><tt>year</tt></i> The year the report was generated</li>
--   <li><i><tt>month</tt></i> The month the report was generated</li>
--   <li><i><tt>day</tt></i> The day the report was generated</li>
--   <li><i><tt>hour</tt></i> The hour the report was generated</li>
--   <li><i><tt>wind</tt></i> The direction and strength of the wind</li>
--   <li><i><tt>visibility</tt></i> Description of current visibility
--   conditions</li>
--   <li><i><tt>skyCondition</tt></i> ?</li>
--   <li><i><tt>tempC</tt></i> The temperature in Celcius</li>
--   <li><i><tt>tempF</tt></i> The temperature in Farenheit</li>
--   <li><i><tt>dewPoint</tt></i> The current dew point</li>
--   <li><i><tt>humidity</tt></i> The current relative humidity</li>
--   <li><i><tt>pressure</tt></i> The current pressure</li>
--   </ul>
--   
--   As an example, a template like
--   
--   <pre>
--   "$tempF$ °F"
--   </pre>
--   
--   would yield a widget displaying the temperature in Farenheit with a
--   small label after it.
--   
--   Implementation Note: the weather data parsing code is taken from
--   xmobar. This version of the code makes direct HTTP requests instead of
--   invoking a separate cURL process.
module System.Taffybar.Weather

-- | The configuration for the weather widget. You can provide a custom
--   format string through <a>weatherTemplate</a> as described above, or
--   you can provide a custom function to turn a <a>WeatherInfo</a> into a
--   String via the <a>weatherFormatter</a> field.
data WeatherConfig
WeatherConfig :: String -> String -> String -> WeatherFormatter -> Maybe String -> WeatherConfig

-- | The weather station to poll. No default
[weatherStation] :: WeatherConfig -> String

-- | Template string, as described above. Default: $tempF$ °F
[weatherTemplate] :: WeatherConfig -> String

-- | Template string, as described above. Default: $tempF$ °F
[weatherTemplateTooltip] :: WeatherConfig -> String

-- | Default: substitute in all interpolated variables (above)
[weatherFormatter] :: WeatherConfig -> WeatherFormatter

-- | The proxy server, e.g. "<a>http://proxy:port"</a>. Default: Nothing
[weatherProxy] :: WeatherConfig -> Maybe String
data WeatherInfo
WI :: String -> String -> String -> String -> String -> String -> String -> String -> String -> Int -> Int -> String -> Int -> Int -> WeatherInfo
[stationPlace] :: WeatherInfo -> String
[stationState] :: WeatherInfo -> String
[year] :: WeatherInfo -> String
[month] :: WeatherInfo -> String
[day] :: WeatherInfo -> String
[hour] :: WeatherInfo -> String
[wind] :: WeatherInfo -> String
[visibility] :: WeatherInfo -> String
[skyCondition] :: WeatherInfo -> String
[tempC] :: WeatherInfo -> Int
[tempF] :: WeatherInfo -> Int
[dewPoint] :: WeatherInfo -> String
[humidity] :: WeatherInfo -> Int
[pressure] :: WeatherInfo -> Int

-- | A wrapper to allow users to specify a custom weather formatter. The
--   default interpolates variables into a string as described above.
--   Custom formatters can do basically anything.
data WeatherFormatter

-- | Specify a custom formatter for <a>WeatherInfo</a>
WeatherFormatter :: (WeatherInfo -> String) -> WeatherFormatter

-- | Create a periodically-updating weather widget that polls NOAA.
weatherNew :: WeatherConfig -> Double -> IO Widget

-- | Create a periodically-updating weather widget using custom weather
--   getter
weatherCustomNew :: IO (Either String WeatherInfo) -> String -> String -> WeatherFormatter -> Double -> IO Widget

-- | A sensible default configuration for the weather widget that just
--   renders the temperature.
defaultWeatherConfig :: String -> WeatherConfig
instance GHC.Show.Show System.Taffybar.Weather.WeatherInfo

module System.Taffybar.Volume

-- | Creates a new text volume meter
volumeTextNew :: String -> String -> Double -> IO Widget

-- | Creates a new volume meter widget
volumeControlNew :: String -> String -> IO Widget

module System.Taffybar.Text.MemoryMonitor

-- | Creates a simple textual memory monitor. It updates once every polling
--   period (in seconds).
textMemoryMonitorNew :: String -> Double -> IO Widget

module System.Taffybar.Text.CPUMonitor

-- | Creates a simple textual CPU monitor. It updates once every polling
--   period (in seconds).
textCpuMonitorNew :: String -> Double -> IO Widget


-- | Simple text widget that displays incoming/outgoing network traffic
--   over one selected interface, as provided by the
--   <a>System.Information.Network</a> module.
module System.Taffybar.NetMonitor

-- | Creates a new network monitor widget. It consists of two
--   <tt>PollingLabel</tt>s, one for incoming and one for outgoing traffic
--   fed by regular calls to <a>getNetInfo</a>.
netMonitorNew :: Double -> String -> IO Widget

-- | Creates a new network monitor widget with custom template and
--   precision. Similar to <a>netMonitorNew</a>.
--   
--   The format template currently supports four units: bytes, kilobytes,
--   megabytes, and auto.
netMonitorNewWith :: Double -> String -> Int -> String -> IO Widget

-- | Like <a>netMonitorNew</a> but allows specification of multiple
--   interfaces. Interfaces are allowed to not exist at all (e.g. unplugged
--   usb ethernet), the resulting speed is the speed of all available
--   interfaces summed up. So you get your network speed regardless of
--   which interface you are currently using.
netMonitorMultiNew :: Double -> [String] -> IO Widget

-- | Like <tt>newMonitorNewWith</tt> but for multiple interfaces.
netMonitorMultiNewWith :: Double -> [String] -> Int -> String -> IO Widget
defaultNetFormat :: String


-- | Simple text widget that monitors the current usage of selected disk
--   partitions by regularly parsing the output of the df command in Linux
--   systems.
module System.Taffybar.FSMonitor

-- | Creates a new filesystem monitor widget. It contains one
--   <tt>PollingLabel</tt> that displays the data returned by the df
--   command. The usage level of all requested partitions is extracted in
--   one single operation.
fsMonitorNew :: Double -> [String] -> IO Widget


-- | Simple function which runs user defined command and returns it's
--   output in PollingLabel widget
module System.Taffybar.CommandRunner

-- | Creates a new command runner widget. This is a <tt>PollingLabel</tt>
--   fed by regular calls to command given by argument. The results of
--   calling this function are displayed as string.
commandRunnerNew :: Double -> String -> [String] -> String -> String -> IO Widget


-- | Utility functions to facilitate building GTK interfaces.
module System.Taffybar.Widgets.Util

-- | Execute the given action as a response to any of the given types of
--   mouse button clicks.
onClick :: [Click] -> IO a -> EventM EButton Bool

-- | Attach the given widget as a popup with the given title to the given
--   window. The newly attached popup is not shown initially. Use the
--   <a>displayPopup</a> function to display it.
attachPopup :: (WidgetClass w, WindowClass wnd) => w -> String -> wnd -> IO ()

-- | Display the given popup widget (previously prepared using the
--   <a>attachPopup</a> function) immediately beneath (or above) the given
--   window.
displayPopup :: (WidgetClass w, WindowClass wnd) => w -> wnd -> IO ()
widgetGetAllocatedSize :: (WidgetClass self, MonadIO m) => self -> m (Int, Int)


-- | This is a graph widget inspired by the widget of the same name in
--   Awesome (the window manager). It plots a series of data points
--   similarly to a bar graph. This version must be explicitly fed data
--   with <a>graphAddSample</a>. For a more automated version, see
--   <tt>PollingGraph</tt>.
--   
--   Like Awesome, this graph can plot multiple data sets in one widget.
--   The data sets are plotted in the order provided by the caller.
--   
--   Note: all of the data fed to this widget should be in the range [0,1].
module System.Taffybar.Widgets.Graph
data GraphHandle

-- | The configuration options for the graph. The padding is the number of
--   pixels reserved as blank space around the widget in each direction.
data GraphConfig
GraphConfig :: Int -> (Double, Double, Double) -> (Double, Double, Double) -> Int -> [(Double, Double, Double, Double)] -> [GraphStyle] -> Int -> Maybe String -> Int -> GraphDirection -> GraphConfig

-- | Number of pixels of padding on each side of the graph widget
[graphPadding] :: GraphConfig -> Int

-- | The background color of the graph (default black)
[graphBackgroundColor] :: GraphConfig -> (Double, Double, Double)

-- | The border color drawn around the graph (default gray)
[graphBorderColor] :: GraphConfig -> (Double, Double, Double)

-- | The width of the border (default 1, use 0 to disable the border)
[graphBorderWidth] :: GraphConfig -> Int

-- | Colors for each data set (default cycles between red, green and blue)
[graphDataColors] :: GraphConfig -> [(Double, Double, Double, Double)]

-- | How to draw each data point (default <tt>repeat Area</tt>)
[graphDataStyles] :: GraphConfig -> [GraphStyle]

-- | The number of data points to retain for each data set (default 20)
[graphHistorySize] :: GraphConfig -> Int

-- | May contain Pango markup (default <tt>Nothing</tt>)
[graphLabel] :: GraphConfig -> Maybe String

-- | The width (in pixels) of the graph widget (default 50)
[graphWidth] :: GraphConfig -> Int

-- | The direction in which the graph will move as time passes (default
--   LEFT_TO_RIGHT)
[graphDirection] :: GraphConfig -> GraphDirection
data GraphDirection
LEFT_TO_RIGHT :: GraphDirection
RIGHT_TO_LEFT :: GraphDirection

-- | The style of the graph. Generally, you will want to draw all
--   <a>Area</a> graphs first, and then all <a>Line</a> graphs.
data GraphStyle

-- | Thea area below the value is filled
Area :: GraphStyle

-- | The values are connected by a line (one pixel wide)
Line :: GraphStyle
graphNew :: GraphConfig -> IO (Widget, GraphHandle)

-- | Add a data point to the graph for each of the tracked data sets. There
--   should be as many values in the list as there are data sets.
graphAddSample :: GraphHandle -> [Double] -> IO ()
defaultGraphConfig :: GraphConfig
instance GHC.Classes.Eq System.Taffybar.Widgets.Graph.GraphDirection


-- | A variant of the Graph widget that automatically updates itself with a
--   callback at a fixed interval.
module System.Taffybar.Widgets.PollingGraph
data GraphHandle

-- | The configuration options for the graph. The padding is the number of
--   pixels reserved as blank space around the widget in each direction.
data GraphConfig
GraphConfig :: Int -> (Double, Double, Double) -> (Double, Double, Double) -> Int -> [(Double, Double, Double, Double)] -> [GraphStyle] -> Int -> Maybe String -> Int -> GraphDirection -> GraphConfig

-- | Number of pixels of padding on each side of the graph widget
[graphPadding] :: GraphConfig -> Int

-- | The background color of the graph (default black)
[graphBackgroundColor] :: GraphConfig -> (Double, Double, Double)

-- | The border color drawn around the graph (default gray)
[graphBorderColor] :: GraphConfig -> (Double, Double, Double)

-- | The width of the border (default 1, use 0 to disable the border)
[graphBorderWidth] :: GraphConfig -> Int

-- | Colors for each data set (default cycles between red, green and blue)
[graphDataColors] :: GraphConfig -> [(Double, Double, Double, Double)]

-- | How to draw each data point (default <tt>repeat Area</tt>)
[graphDataStyles] :: GraphConfig -> [GraphStyle]

-- | The number of data points to retain for each data set (default 20)
[graphHistorySize] :: GraphConfig -> Int

-- | May contain Pango markup (default <tt>Nothing</tt>)
[graphLabel] :: GraphConfig -> Maybe String

-- | The width (in pixels) of the graph widget (default 50)
[graphWidth] :: GraphConfig -> Int

-- | The direction in which the graph will move as time passes (default
--   LEFT_TO_RIGHT)
[graphDirection] :: GraphConfig -> GraphDirection
data GraphDirection
LEFT_TO_RIGHT :: GraphDirection
RIGHT_TO_LEFT :: GraphDirection

-- | The style of the graph. Generally, you will want to draw all
--   <a>Area</a> graphs first, and then all <a>Line</a> graphs.
data GraphStyle

-- | Thea area below the value is filled
Area :: GraphStyle

-- | The values are connected by a line (one pixel wide)
Line :: GraphStyle
pollingGraphNew :: GraphConfig -> Double -> IO [Double] -> IO Widget
defaultGraphConfig :: GraphConfig


-- | Simple Disk IO monitor that uses a PollingGraph to visualize the speed
--   of read/write operations in one selected disk or partition.
module System.Taffybar.DiskIOMonitor

-- | Creates a new disk IO monitor widget. This is a <tt>PollingGraph</tt>
--   fed by regular calls to <a>getDiskTransfer</a>. The results of calling
--   this function are normalized to the maximum value of the obtained
--   probe (either read or write transfer).
dioMonitorNew :: GraphConfig -> Double -> String -> IO Widget


-- | Simple CPU monitor that uses a PollingGraph to visualize variations in
--   the user and system CPU times in one selected core, or in all cores
--   available.
module System.Taffybar.CPUMonitor

-- | Creates a new CPU monitor. This is a PollingGraph fed by regular calls
--   to getCPUInfo, associated to an IORef used to remember the values
--   yielded by the last call to this function.
cpuMonitorNew :: GraphConfig -> Double -> String -> IO Widget
probe :: IORef [Int] -> String -> IO [Double]


-- | This module implements a very simple text-based clock widget. The
--   widget also toggles a calendar widget when clicked. This calendar is
--   not fancy at all and has no data backend.
module System.Taffybar.SimpleClock

-- | Create the widget. I recommend passing <tt>Nothing</tt> for the
--   TimeLocale parameter. The format string can include Pango markup
--   (http:/<i>developer.gnome.org</i>pango<i>stable</i>PangoMarkupFormat.html).
textClockNew :: Maybe TimeLocale -> String -> Double -> IO Widget

-- | A configurable text-based clock widget. It currently allows for a
--   configurable time zone through the <a>ClockConfig</a>.
--   
--   See also <a>textClockNew</a>.
textClockNewWith :: ClockConfig -> String -> Double -> IO Widget

-- | A clock configuration that defaults to the current locale
defaultClockConfig :: ClockConfig
data ClockConfig
ClockConfig :: Maybe TimeZone -> Maybe TimeLocale -> ClockConfig
[clockTimeZone] :: ClockConfig -> Maybe TimeZone
[clockTimeLocale] :: ClockConfig -> Maybe TimeLocale
instance GHC.Show.Show System.Taffybar.SimpleClock.ClockConfig
instance GHC.Classes.Ord System.Taffybar.SimpleClock.ClockConfig
instance GHC.Classes.Eq System.Taffybar.SimpleClock.ClockConfig


-- | Simple text widget that shows the XMonad layout used in the currently
--   active workspace, and that allows to change it by clicking with the
--   mouse: left-click to switch to the next layout in the list,
--   right-click to switch to the first one (as configured in
--   <tt>xmonad.hs</tt>)
--   
--   N.B. If you're just looking for a drop-in replacement for the
--   <a>System.Taffybar.XMonadLog</a> widget that is clickable and doesn't
--   require DBus, you may want to see first
--   <a>System.Taffybar.TaffyPager</a>.
module System.Taffybar.LayoutSwitcher

-- | Create a new LayoutSwitcher widget that will use the given Pager as
--   its source of events.
layoutSwitcherNew :: Pager -> IO Widget


-- | A vertical bar that can plot data in the range [0, 1]. The colors are
--   configurable.
module System.Taffybar.Widgets.VerticalBar
data VerticalBarHandle
data BarConfig
BarConfig :: (Double, Double, Double) -> Double -> (Double, Double, Double) -> Double -> (Double, Double, Double) -> Int -> Int -> BarDirection -> BarConfig

-- | Color of the border drawn around the widget
[barBorderColor] :: BarConfig -> (Double, Double, Double)

-- | The background color of the widget
[barBackgroundColor] :: BarConfig -> Double -> (Double, Double, Double)

-- | A function to determine the color of the widget for the current data
--   point
[barColor] :: BarConfig -> Double -> (Double, Double, Double)

-- | Number of pixels of padding around the widget
[barPadding] :: BarConfig -> Int
[barWidth] :: BarConfig -> Int
[barDirection] :: BarConfig -> BarDirection
BarConfigIO :: IO (Double, Double, Double) -> Double -> IO (Double, Double, Double) -> Double -> IO (Double, Double, Double) -> Int -> Int -> BarDirection -> BarConfig
[barBorderColorIO] :: BarConfig -> IO (Double, Double, Double)
[barBackgroundColorIO] :: BarConfig -> Double -> IO (Double, Double, Double)
[barColorIO] :: BarConfig -> Double -> IO (Double, Double, Double)

-- | Number of pixels of padding around the widget
[barPadding] :: BarConfig -> Int
[barWidth] :: BarConfig -> Int
[barDirection] :: BarConfig -> BarDirection
data BarDirection
HORIZONTAL :: BarDirection
VERTICAL :: BarDirection
verticalBarNew :: BarConfig -> IO (Widget, VerticalBarHandle)
verticalBarSetPercent :: VerticalBarHandle -> Double -> IO ()

-- | A default bar configuration. The color of the active portion of the
--   bar must be specified.
defaultBarConfig :: (Double -> (Double, Double, Double)) -> BarConfig
defaultBarConfigIO :: (Double -> IO (Double, Double, Double)) -> BarConfig


-- | Like the vertical bar, but this widget automatically updates itself
--   with a callback at fixed intervals.
module System.Taffybar.Widgets.PollingBar
data VerticalBarHandle
data BarConfig
BarConfig :: (Double, Double, Double) -> Double -> (Double, Double, Double) -> Double -> (Double, Double, Double) -> Int -> Int -> BarDirection -> BarConfig

-- | Color of the border drawn around the widget
[barBorderColor] :: BarConfig -> (Double, Double, Double)

-- | The background color of the widget
[barBackgroundColor] :: BarConfig -> Double -> (Double, Double, Double)

-- | A function to determine the color of the widget for the current data
--   point
[barColor] :: BarConfig -> Double -> (Double, Double, Double)

-- | Number of pixels of padding around the widget
[barPadding] :: BarConfig -> Int
[barWidth] :: BarConfig -> Int
[barDirection] :: BarConfig -> BarDirection
BarConfigIO :: IO (Double, Double, Double) -> Double -> IO (Double, Double, Double) -> Double -> IO (Double, Double, Double) -> Int -> Int -> BarDirection -> BarConfig
[barBorderColorIO] :: BarConfig -> IO (Double, Double, Double)
[barBackgroundColorIO] :: BarConfig -> Double -> IO (Double, Double, Double)
[barColorIO] :: BarConfig -> Double -> IO (Double, Double, Double)

-- | Number of pixels of padding around the widget
[barPadding] :: BarConfig -> Int
[barWidth] :: BarConfig -> Int
[barDirection] :: BarConfig -> BarDirection
data BarDirection
HORIZONTAL :: BarDirection
VERTICAL :: BarDirection
pollingBarNew :: BarConfig -> Double -> IO Double -> IO Widget

-- | A default bar configuration. The color of the active portion of the
--   bar must be specified.
defaultBarConfig :: (Double -> (Double, Double, Double)) -> BarConfig


-- | This module provides battery widgets using the UPower system service.
--   
--   Currently it reports only the first battery it finds. If it does not
--   find a battery, it just returns an obnoxious widget with warning text
--   in it. Battery hotplugging is not supported. These more advanced
--   features could be supported if there is interest.
module System.Taffybar.Battery

-- | A fancy graphical battery widget that represents batteries as colored
--   vertical bars (one per battery). There is also a textual percentage
--   reppadout next to the bars, containing a summary of battery
--   information.
batteryBarNew :: BarConfig -> Double -> IO Widget

-- | A battery bar constructor which allows using a custom format string in
--   order to display more information, such as charging/discharging time
--   and status. An example: "$percentage$% ($time$) - $status$".
batteryBarNewWithFormat :: BarConfig -> String -> Double -> IO Widget

-- | A simple textual battery widget that auto-updates once every polling
--   period (specified in seconds). The displayed format is specified
--   format string where $percentage$ is replaced with the percentage of
--   battery remaining and $time$ is replaced with the time until the
--   battery is fully charged/discharged.
--   
--   Multiple battery values are combined as follows: - for time remaining,
--   the largest value is used. - for percentage, the mean is taken.
textBatteryNew :: [IORef BatteryContext] -> String -> Double -> IO Widget

-- | A default configuration for the graphical battery display. The bar
--   will be red when power is critical (&lt; 10%), green if it is full
--   (&gt; 90%), and grey otherwise.
--   
--   You can customize this with any of the options in <a>BarConfig</a>
defaultBatteryConfig :: BarConfig
instance GHC.Show.Show System.Taffybar.Battery.BatteryWidgetInfo
instance GHC.Classes.Eq System.Taffybar.Battery.BatteryWidgetInfo


-- | Menu widget that shows the title of the currently focused window and
--   that, when clicked, displays the list of all currently open windows
--   allowing to switch to any of them.
--   
--   N.B. If you're just looking for a drop-in replacement for the
--   <a>System.Taffybar.XMonadLog</a> widget that is clickable and doesn't
--   require DBus, you may want to see first
--   <a>System.Taffybar.TaffyPager</a>.
module System.Taffybar.WindowSwitcher

-- | Create a new WindowSwitcher widget that will use the given Pager as
--   its source of events.
windowSwitcherNew :: Pager -> IO Widget


module System.Taffybar.WorkspaceHUD
data Context
Context :: MVar (Map WorkspaceIdx WWC) -> MVar (Map WorkspaceIdx Workspace) -> MVar Bool -> HBox -> WorkspaceHUDConfig -> Pager -> Context
[controllersVar] :: Context -> MVar (Map WorkspaceIdx WWC)
[workspacesVar] :: Context -> MVar (Map WorkspaceIdx Workspace)
[loggingVar] :: Context -> MVar Bool
[hudWidget] :: Context -> HBox
[hudConfig] :: Context -> WorkspaceHUDConfig
[hudPager] :: Context -> Pager
type ControllerConstructor = Workspace -> HUDIO WWC
type HUDIO a = ReaderT Context IO a
data IconInfo
IIEWMH :: EWMHIcon -> IconInfo
IIFilePath :: FilePath -> IconInfo
IIColor :: ColorRGBA -> IconInfo
IINone :: IconInfo
data WWC
WWC :: a -> WWC
data WindowData
WindowData :: X11Window -> String -> String -> Bool -> Bool -> Bool -> WindowData
[windowId] :: WindowData -> X11Window
[windowTitle] :: WindowData -> String
[windowClass] :: WindowData -> String
[windowUrgent] :: WindowData -> Bool
[windowActive] :: WindowData -> Bool
[windowMinimized] :: WindowData -> Bool
data Workspace
Workspace :: WorkspaceIdx -> String -> WorkspaceState -> [WindowData] -> Workspace
[workspaceIdx] :: Workspace -> WorkspaceIdx
[workspaceName] :: Workspace -> String
[workspaceState] :: Workspace -> WorkspaceState
[windows] :: Workspace -> [WindowData]
data WorkspaceButtonController
WorkspaceButtonController :: EventBox -> Workspace -> WWC -> WorkspaceButtonController
[button] :: WorkspaceButtonController -> EventBox
[buttonWorkspace] :: WorkspaceButtonController -> Workspace
[contentsController] :: WorkspaceButtonController -> WWC
data WorkspaceContentsController
WorkspaceContentsController :: Widget -> [WWC] -> WorkspaceContentsController
[containerWidget] :: WorkspaceContentsController -> Widget
[contentsControllers] :: WorkspaceContentsController -> [WWC]
data WorkspaceHUDConfig
WorkspaceHUDConfig :: ControllerConstructor -> Int -> Int -> Int -> Maybe Int -> Int -> Maybe Int -> Int -> WindowData -> HUDIO IconInfo -> Workspace -> HUDIO String -> Bool -> Workspace -> Bool -> Int -> [String] -> Integer -> Bool -> [WindowData] -> HUDIO [WindowData] -> Bool -> WorkspaceHUDConfig
[widgetBuilder] :: WorkspaceHUDConfig -> ControllerConstructor
[widgetGap] :: WorkspaceHUDConfig -> Int
[windowIconSize] :: WorkspaceHUDConfig -> Int
[underlineHeight] :: WorkspaceHUDConfig -> Int
[minWSWidgetSize] :: WorkspaceHUDConfig -> Maybe Int
[underlinePadding] :: WorkspaceHUDConfig -> Int
[maxIcons] :: WorkspaceHUDConfig -> Maybe Int
[minIcons] :: WorkspaceHUDConfig -> Int
[getIconInfo] :: WorkspaceHUDConfig -> WindowData -> HUDIO IconInfo
[labelSetter] :: WorkspaceHUDConfig -> Workspace -> HUDIO String
[updateOnWMIconChange] :: WorkspaceHUDConfig -> Bool
[showWorkspaceFn] :: WorkspaceHUDConfig -> Workspace -> Bool
[borderWidth] :: WorkspaceHUDConfig -> Int
[updateEvents] :: WorkspaceHUDConfig -> [String]
[updateRateLimitMicroseconds] :: WorkspaceHUDConfig -> Integer
[debugMode] :: WorkspaceHUDConfig -> Bool
[iconSort] :: WorkspaceHUDConfig -> [WindowData] -> HUDIO [WindowData]
[urgentWorkspaceState] :: WorkspaceHUDConfig -> Bool
data WorkspaceState
Active :: WorkspaceState
Visible :: WorkspaceState
Hidden :: WorkspaceState
Empty :: WorkspaceState
Urgent :: WorkspaceState
data WorkspaceUnderlineController
WorkspaceUnderlineController :: Table -> EventBox -> WWC -> WorkspaceUnderlineController
[table] :: WorkspaceUnderlineController -> Table
[underline] :: WorkspaceUnderlineController -> EventBox
[overlineController] :: WorkspaceUnderlineController -> WWC
class WorkspaceWidgetController wc
getWidget :: WorkspaceWidgetController wc => wc -> Widget
updateWidget :: WorkspaceWidgetController wc => wc -> WidgetUpdate -> HUDIO wc
updateWidgetX11 :: WorkspaceWidgetController wc => wc -> WidgetUpdate -> HUDIO wc
data IconController
IconController :: HBox -> [IconWidget] -> Workspace -> IconController
[iconsContainer] :: IconController -> HBox
[iconImages] :: IconController -> [IconWidget]
[iconWorkspace] :: IconController -> Workspace
buildBorderButtonController :: ControllerConstructor
buildButtonController :: ParentControllerConstructor
buildContentsController :: [ControllerConstructor] -> ControllerConstructor
buildIconController :: ControllerConstructor
buildLabelController :: ControllerConstructor
buildPadBox :: WidgetClass widget => widget -> IO EventBox
buildUnderlineButtonController :: ControllerConstructor
buildUnderlineController :: ParentControllerConstructor
buildWorkspaceHUD :: WorkspaceHUDConfig -> Pager -> IO Widget
buildWorkspaces :: Map WorkspaceIdx Workspace -> HUDIO (Map WorkspaceIdx Workspace)
defaultBuildContentsController :: ControllerConstructor
defaultGetIconInfo :: WindowData -> HUDIO IconInfo
defaultWorkspaceHUDConfig :: WorkspaceHUDConfig
getWorkspaceToWindows :: [X11Window] -> X11Property (MultiMap WorkspaceIdx X11Window)
hideEmpty :: Workspace -> Bool
hudFromPagerConfig :: PagerConfig -> WorkspaceHUDConfig
liftPager :: PagerIO a -> HUDIO a
liftX11Def :: a -> X11Property a -> HUDIO a
setImage :: Int -> Image -> Maybe Pixbuf -> IO ()
widgetSetClass :: WidgetClass widget => widget -> String -> IO ()
windowTitleClassIconGetter :: (Bool -> String -> String -> IconInfo) -> (WindowData -> HUDIO IconInfo)
instance GHC.Classes.Eq System.Taffybar.WorkspaceHUD.Workspace
instance GHC.Show.Show System.Taffybar.WorkspaceHUD.Workspace
instance GHC.Classes.Eq System.Taffybar.WorkspaceHUD.WindowData
instance GHC.Show.Show System.Taffybar.WorkspaceHUD.WindowData
instance GHC.Show.Show System.Taffybar.WorkspaceHUD.IconInfo
instance GHC.Classes.Eq System.Taffybar.WorkspaceHUD.IconInfo
instance GHC.Classes.Eq System.Taffybar.WorkspaceHUD.WorkspaceState
instance GHC.Show.Show System.Taffybar.WorkspaceHUD.WorkspaceState
instance System.Taffybar.WorkspaceHUD.WorkspaceWidgetController System.Taffybar.WorkspaceHUD.WorkspaceBorderController
instance System.Taffybar.WorkspaceHUD.WorkspaceWidgetController System.Taffybar.WorkspaceHUD.WorkspaceUnderlineController
instance System.Taffybar.WorkspaceHUD.WorkspaceWidgetController System.Taffybar.WorkspaceHUD.WorkspaceButtonController
instance System.Taffybar.WorkspaceHUD.WorkspaceWidgetController System.Taffybar.WorkspaceHUD.IconController
instance System.Taffybar.WorkspaceHUD.WorkspaceWidgetController System.Taffybar.WorkspaceHUD.LabelController
instance System.Taffybar.WorkspaceHUD.WorkspaceWidgetController System.Taffybar.WorkspaceHUD.WorkspaceContentsController
instance System.Taffybar.WorkspaceHUD.WorkspaceWidgetController System.Taffybar.WorkspaceHUD.WWC


-- | This module provides a drop-in replacement for the XMonadLog widget
--   that allows to:
--   
--   <ul>
--   <li>click on a workspace label to switch to that workspace,</li>
--   <li>left-click on the layout label to switch to the next layout, and
--   right-click to switch to the first layout,</li>
--   <li>click on the window title to pop-up a list of all the currently
--   open windows that can be clicked to switch to any of them,</li>
--   </ul>
--   
--   All its interactions with the windows manager are performed via EWMH
--   hints and X11 events.
--   
--   This widget is actually only a convenience wrapper around a Pager, a
--   WorkspaceSwitcher (now WorkspaceHUD), a LayoutSwitcher and a
--   WindowSwitcher. If you are looking for more advanced configurations
--   (like having components displayed separately, or using only part of
--   them), consult directly the documentation for each of the components.
module System.Taffybar.TaffyPager

-- | Structure contanining functions to customize the pretty printing of
--   different widget elements.
data PagerConfig
PagerConfig :: String -> String -> String -> String -> String -> IO String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> String -> Bool -> Int -> Bool -> Bool -> Int -> Bool -> Bool -> String -> String -> Maybe FilePath -> Map WorkspaceIdx String -> X11WindowHandle -> String -> PagerConfig

-- | the name of the active window.
[activeWindow] :: PagerConfig -> String -> String

-- | the currently active layout.
[activeLayout] :: PagerConfig -> String -> String

-- | IO action to modify active layout.
[activeLayoutIO] :: PagerConfig -> String -> IO String

-- | the currently active workspace.
[activeWorkspace] :: PagerConfig -> String -> String

-- | inactive workspace with windows.
[hiddenWorkspace] :: PagerConfig -> String -> String

-- | inactive workspace with no windows.
[emptyWorkspace] :: PagerConfig -> String -> String

-- | all other visible workspaces (Xinerama or XRandR).
[visibleWorkspace] :: PagerConfig -> String -> String

-- | workspaces containing windows with the urgency hint set.
[urgentWorkspace] :: PagerConfig -> String -> String

-- | separator to use between desktop widgets in <tt>TaffyPager</tt>.
[widgetSep] :: PagerConfig -> String

-- | wrap workspace buttons in a frame
[workspaceBorder] :: PagerConfig -> Bool

-- | space in pixels between workspace buttons
[workspaceGap] :: PagerConfig -> Int

-- | pad workspace name in button
[workspacePad] :: PagerConfig -> Bool

-- | use images in the workspace switcher
[useImages] :: PagerConfig -> Bool

-- | image height and width in pixels
[imageSize] :: PagerConfig -> Int

-- | fill empty images instead of clearing them
[fillEmptyImages] :: PagerConfig -> Bool

-- | get custom icon based on: has-EWMH-icon, window-title, window-class
[customIcon] :: PagerConfig -> Bool -> String -> String -> Maybe FilePath

-- | title windows for WindowSwitcher
[windowSwitcherFormatter] :: PagerConfig -> Map WorkspaceIdx String -> X11WindowHandle -> String

-- | Default pretty printing options.
defaultPagerConfig :: PagerConfig

-- | <i>Deprecated: Using PagerConfig is deprecated; Use WorkspaceHUDConfig
--   instead.</i>
taffyPagerHUDLegacy :: PagerConfig -> IO Widget
taffyPagerHUDNew :: PagerConfig -> WorkspaceHUDConfig -> IO Widget

-- | Create a new TaffyPager widget.

-- | <i>Deprecated: Using PagerConfig is deprecated; Use WorkspaceHUDConfig
--   instead.</i>
taffyPagerNew :: PagerConfig -> IO Widget


-- | Composite widget that displays all currently configured workspaces and
--   allows to switch to any of them by clicking on its label. Supports
--   also urgency hints and (with an additional hook) display of other
--   visible workspaces besides the active one (in Xinerama or XRandR
--   installations).
--   
--   N.B. If you're just looking for a drop-in replacement for the
--   <a>System.Taffybar.XMonadLog</a> widget that is clickable and doesn't
--   require DBus, you may want to see first
--   <a>System.Taffybar.TaffyPager</a>.

-- | <i>Deprecated: Use WorkspaceHUD instead of WorkspaceSwitcher</i>
module System.Taffybar.WorkspaceSwitcher

-- | Create a new WorkspaceSwitcher widget that will use the given Pager as
--   its source of events.
wspaceSwitcherNew :: Pager -> IO Widget
