| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
System.Taffybar.Widget
Contents
- System.Taffybar.Widget.Battery
- System.Taffybar.Widget.CPUMonitor
- System.Taffybar.Widget.CommandRunner
- System.Taffybar.Widget.Decorators
- System.Taffybar.Widget.DiskIOMonitor
- System.Taffybar.Widget.FSMonitor
- System.Taffybar.Widget.FreedesktopNotifications
- System.Taffybar.Widget.Layout
- System.Taffybar.Widget.MPRIS2
- System.Taffybar.Widget.NetworkGraph
- System.Taffybar.Widget.SNITray
- System.Taffybar.Widget.SimpleClock
- System.Taffybar.Widget.Text.CPUMonitor
- System.Taffybar.Widget.Text.MemoryMonitor
- System.Taffybar.Widget.Text.NetworkMonitor
- System.Taffybar.Widget.Volume
- System.Taffybar.Widget.Weather
- System.Taffybar.Widget.Windows
- System.Taffybar.Widget.Workspaces
- System.Taffybar.Widget.XDGMenu.MenuWidget
- module System.Taffybar.Widget.Util
- batteryBarNew :: MonadIO m => BarConfig -> Double -> m Widget
- batteryBarNewWithFormat :: MonadIO m => BarConfig -> String -> Double -> m Widget
- textBatteryNew :: [IORef BatteryContext] -> String -> Double -> IO Widget
- defaultBatteryConfig :: BarConfig
- cpuMonitorNew :: MonadIO m => GraphConfig -> Double -> String -> m Widget
- commandRunnerNew :: MonadIO m => Double -> String -> [String] -> String -> m Widget
- module System.Taffybar.Widget.Decorators
- dioMonitorNew :: MonadIO m => GraphConfig -> Double -> String -> m Widget
- fsMonitorNew :: MonadIO m => Double -> [String] -> m Widget
- data Notification = Notification {- noteAppName :: Text
- noteReplaceId :: Word32
- noteSummary :: Text
- noteBody :: Text
- noteExpireTimeout :: Maybe Int32
- noteId :: Word32
 
- data NotificationConfig = NotificationConfig {}
- defaultNotificationConfig :: NotificationConfig
- notifyAreaNew :: MonadIO m => NotificationConfig -> m Widget
- newtype LayoutConfig = LayoutConfig {- formatLayout :: String -> TaffyIO String
 
- defaultLayoutConfig :: LayoutConfig
- layoutNew :: LayoutConfig -> TaffyIO Widget
- mpris2New :: TaffyIO Widget
- module System.Taffybar.Widget.NetworkGraph
- sniTrayNew :: TaffyIO Widget
- textClockNew :: MonadIO m => Maybe TimeLocale -> String -> Double -> m Widget
- textClockNewWith :: MonadIO m => ClockConfig -> String -> Double -> m Widget
- defaultClockConfig :: ClockConfig
- data ClockConfig = ClockConfig {}
- module System.Taffybar.Widget.Text.CPUMonitor
- module System.Taffybar.Widget.Text.MemoryMonitor
- module System.Taffybar.Widget.Text.NetworkMonitor
- volumeTextNew :: MonadIO m => String -> String -> Double -> m Widget
- volumeControlNew :: String -> String -> IO Widget
- data WeatherConfig = WeatherConfig {}
- data WeatherInfo = WI {}
- data WeatherFormatter = WeatherFormatter (WeatherInfo -> String)
- weatherNew :: WeatherConfig -> Double -> IO Widget
- weatherCustomNew :: MonadIO m => IO (Either String WeatherInfo) -> String -> String -> WeatherFormatter -> Double -> m Widget
- defaultWeatherConfig :: String -> WeatherConfig
- windowsNew :: WindowsConfig -> TaffyIO Widget
- data WindowsConfig = WindowsConfig {}
- defaultWindowsConfig :: WindowsConfig
- truncatedGetActiveLabel :: Int -> TaffyIO String
- truncatedGetMenuLabel :: Int -> X11Window -> TaffyIO String
- data IconInfo
- data Workspace = Workspace {}
- data WorkspacesConfig = WorkspacesConfig {- widgetBuilder :: ControllerConstructor
- widgetGap :: Int
- windowIconSize :: Int
- underlineHeight :: Int
- minWSWidgetSize :: Maybe Int
- underlinePadding :: Int
- maxIcons :: Maybe Int
- minIcons :: Int
- getIconInfo :: WindowData -> WorkspacesIO IconInfo
- labelSetter :: Workspace -> WorkspacesIO String
- showWorkspaceFn :: Workspace -> Bool
- borderWidth :: Int
- updateEvents :: [String]
- updateRateLimitMicroseconds :: Integer
- iconSort :: [WindowData] -> WorkspacesIO [WindowData]
- urgentWorkspaceState :: Bool
 
- type WorkspacesIO a = ReaderT WorkspacesContext IO a
- hideEmpty :: Workspace -> Bool
- workspacesNew :: WorkspacesConfig -> TaffyIO Widget
- module System.Taffybar.Widget.XDGMenu.MenuWidget
Documentation
module System.Taffybar.Widget.Util
System.Taffybar.Widget.Battery
batteryBarNew :: MonadIO m => BarConfig -> Double -> m Widget Source #
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.
batteryBarNewWithFormat :: MonadIO m => BarConfig -> String -> Double -> m Widget Source #
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$".
Arguments
| :: [IORef BatteryContext] | |
| -> String | Display format | 
| -> Double | Poll period in seconds | 
| -> IO Widget | 
defaultBatteryConfig :: BarConfig Source #
A default configuration for the graphical battery display. The bar will be red when power is critical (< 10%), green if it is full (> 90%), and grey otherwise.
You can customize this with any of the options in BarConfig
System.Taffybar.Widget.CPUMonitor
Arguments
| :: MonadIO m | |
| => GraphConfig | Configuration data for the Graph. | 
| -> Double | Polling period (in seconds). | 
| -> String | Name of the core to watch (e.g. "cpu", "cpu0"). | 
| -> m Widget | 
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.
System.Taffybar.Widget.CommandRunner
Arguments
| :: MonadIO m | |
| => Double | Polling period (in seconds). | 
| -> String | Command to execute. Should be in $PATH or an absolute path | 
| -> [String] | Command argument. May be  | 
| -> String | If command fails this will be displayed. | 
| -> m Widget | 
Creates a new command runner widget. This is a PollingLabel fed by
 regular calls to command given by argument. The results of calling this
 function are displayed as string.
System.Taffybar.Widget.Decorators
System.Taffybar.Widget.DiskIOMonitor
Arguments
| :: MonadIO m | |
| => GraphConfig | Configuration data for the Graph. | 
| -> Double | Polling period (in seconds). | 
| -> String | Name of the disk or partition to watch (e.g. "sda", "sdb1"). | 
| -> m Widget | 
Creates a new disk IO monitor widget. This is a PollingGraph fed by
 regular calls to getDiskTransfer. The results of calling this function
 are normalized to the maximum value of the obtained probe (either read or
 write transfer).
System.Taffybar.Widget.FSMonitor
Arguments
| :: MonadIO m | |
| => Double | Polling interval (in seconds, e.g. 500) | 
| -> [String] | Names of the partitions to monitor (e.g. ["/", "/home"]) | 
| -> m Widget | 
Creates a new filesystem monitor widget. It contains one PollingLabel
 that displays the data returned by the df command. The usage level of all
 requested partitions is extracted in one single operation.
System.Taffybar.Widget.FreedesktopNotifications
data Notification Source #
A simple structure representing a Freedesktop notification
Constructors
| Notification | |
| Fields 
 | |
Instances
data NotificationConfig Source #
Constructors
| NotificationConfig | |
| Fields 
 | |
defaultNotificationConfig :: NotificationConfig Source #
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.
notifyAreaNew :: MonadIO m => NotificationConfig -> m Widget Source #
Create a new notification area with the given configuration.
System.Taffybar.Widget.Layout
newtype LayoutConfig Source #
Constructors
| LayoutConfig | |
| Fields 
 | |
layoutNew :: LayoutConfig -> TaffyIO Widget Source #
Create a new Layout widget that will use the given Pager as its source of events.
System.Taffybar.Widget.MPRIS2
System.Taffybar.Widget.NetworkGraph
System.Taffybar.Widget.SNITray
sniTrayNew :: TaffyIO Widget Source #
Build a new StatusNotifierItem tray that will share a host with any other trays that are constructed automatically
System.Taffybar.Widget.SimpleClock
textClockNew :: MonadIO m => Maybe TimeLocale -> String -> Double -> m Widget Source #
Create the widget. I recommend passing Nothing for the TimeLocale
 parameter. The format string can include Pango markup
 (http:/developer.gnome.orgpangostablePangoMarkupFormat.html).
textClockNewWith :: MonadIO m => ClockConfig -> String -> Double -> m Widget Source #
A configurable text-based clock widget.  It currently allows for
 a configurable time zone through the ClockConfig.
See also textClockNew.
defaultClockConfig :: ClockConfig Source #
A clock configuration that defaults to the current locale
System.Taffybar.Widget.Text.CPUMonitor
System.Taffybar.Widget.Text.MemoryMonitor
System.Taffybar.Widget.Text.NetworkMonitor
System.Taffybar.Widget.Volume
volumeTextNew :: MonadIO m => String -> String -> Double -> m Widget Source #
Creates a new text volume meter
System.Taffybar.Widget.Weather
data WeatherConfig Source #
The configuration for the weather widget.  You can provide a custom
 format string through weatherTemplate as described above, or you can
 provide a custom function to turn a WeatherInfo into a String via the
 weatherFormatter field.
Constructors
| WeatherConfig | |
| Fields 
 | |
data WeatherFormatter Source #
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.
Constructors
| WeatherFormatter (WeatherInfo -> String) | Specify a custom formatter for  | 
Arguments
| :: WeatherConfig | Configuration to render | 
| -> Double | Polling period in _minutes_ | 
| -> IO Widget | 
Create a periodically-updating weather widget that polls NOAA.
Arguments
| :: MonadIO m | |
| => IO (Either String WeatherInfo) | Weather querying action | 
| -> String | Weather template | 
| -> String | Weather template | 
| -> WeatherFormatter | Weather formatter | 
| -> Double | Polling period in _minutes_ | 
| -> m Widget | 
Create a periodically-updating weather widget using custom weather getter
defaultWeatherConfig :: String -> WeatherConfig Source #
A sensible default configuration for the weather widget that just renders the temperature.
System.Taffybar.Widget.Windows
windowsNew :: WindowsConfig -> TaffyIO Widget Source #
Create a new Windows widget that will use the given Pager as its source of events.
data WindowsConfig Source #
Constructors
| WindowsConfig | |
| Fields 
 | |
System.Taffybar.Widget.Workspaces
Constructors
| IIEWMH EWMHIconData | |
| IIFilePath FilePath | |
| IIColor ColorRGBA | |
| IINone | 
Constructors
| Workspace | |
| Fields | |
data WorkspacesConfig Source #
Constructors
| WorkspacesConfig | |
| Fields 
 | |
type WorkspacesIO a = ReaderT WorkspacesContext IO a Source #
workspacesNew :: WorkspacesConfig -> TaffyIO Widget Source #