| 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.Weather
- System.Taffybar.Widget.Windows
- System.Taffybar.Widget.Workspaces
- System.Taffybar.Widget.XDGMenu.MenuWidget
Synopsis
- module System.Taffybar.Widget.Util
- module System.Taffybar.Widget.Battery
- cpuMonitorNew :: MonadIO m => GraphConfig -> Double -> String -> m Widget
- commandRunnerNew :: MonadIO m => Double -> String -> [String] -> Text -> 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 :: Text -> TaffyIO Text
- defaultLayoutConfig :: LayoutConfig
- layoutNew :: LayoutConfig -> TaffyIO Widget
- mpris2New :: TaffyIO Widget
- module System.Taffybar.Widget.NetworkGraph
- module System.Taffybar.Widget.SNITray
- 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
- data WeatherConfig = WeatherConfig {}
- data WeatherInfo = WI {}
- data WeatherFormatter = WeatherFormatter (WeatherInfo -> String)
- weatherNew :: MonadIO m => WeatherConfig -> Double -> m 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 Text
- truncatedGetMenuLabel :: Int -> X11Window -> TaffyIO Text
- module System.Taffybar.Widget.Workspaces
- module System.Taffybar.Widget.XDGMenu.MenuWidget
Documentation
module System.Taffybar.Widget.Util
System.Taffybar.Widget.Battery
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 |
| -> Text | 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 #
A simple structure representing a Freedesktop notification
Constructors
| Notification | |
Fields
| |
Instances
| Eq Notification # | |
| Show Notification # | |
Defined in System.Taffybar.Widget.FreedesktopNotifications Methods showsPrec :: Int -> Notification -> ShowS # show :: Notification -> String # showList :: [Notification] -> ShowS # | |
data NotificationConfig #
Constructors
| NotificationConfig | |
Fields
| |
defaultNotificationConfig :: NotificationConfig #
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 #
Create a new notification area with the given configuration.
System.Taffybar.Widget.Layout
newtype LayoutConfig #
Constructors
| LayoutConfig | |
Fields
| |
layoutNew :: LayoutConfig -> TaffyIO Widget #
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
System.Taffybar.Widget.SimpleClock
textClockNew :: MonadIO m => Maybe TimeLocale -> String -> Double -> m Widget #
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 #
A configurable text-based clock widget. It currently allows for
a configurable time zone through the ClockConfig.
See also textClockNew.
defaultClockConfig :: ClockConfig #
A clock configuration that defaults to the current locale
data ClockConfig #
Constructors
| ClockConfig | |
Fields | |
Instances
| Eq ClockConfig # | |
Defined in System.Taffybar.Widget.SimpleClock | |
| Ord ClockConfig # | |
Defined in System.Taffybar.Widget.SimpleClock Methods compare :: ClockConfig -> ClockConfig -> Ordering # (<) :: ClockConfig -> ClockConfig -> Bool # (<=) :: ClockConfig -> ClockConfig -> Bool # (>) :: ClockConfig -> ClockConfig -> Bool # (>=) :: ClockConfig -> ClockConfig -> Bool # max :: ClockConfig -> ClockConfig -> ClockConfig # min :: ClockConfig -> ClockConfig -> ClockConfig # | |
| Show ClockConfig # | |
Defined in System.Taffybar.Widget.SimpleClock Methods showsPrec :: Int -> ClockConfig -> ShowS # show :: ClockConfig -> String # showList :: [ClockConfig] -> ShowS # | |
System.Taffybar.Widget.Text.CPUMonitor
System.Taffybar.Widget.Text.MemoryMonitor
System.Taffybar.Widget.Text.NetworkMonitor
System.Taffybar.Widget.Weather
data WeatherConfig #
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 WeatherInfo #
Constructors
| WI | |
Instances
| Show WeatherInfo # | |
Defined in System.Taffybar.Widget.Weather Methods showsPrec :: Int -> WeatherInfo -> ShowS # show :: WeatherInfo -> String # showList :: [WeatherInfo] -> ShowS # | |
data WeatherFormatter #
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
| :: MonadIO m | |
| => WeatherConfig | Configuration to render |
| -> Double | Polling period in _minutes_ |
| -> m 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 #
A sensible default configuration for the weather widget that just renders the temperature.
System.Taffybar.Widget.Windows
windowsNew :: WindowsConfig -> TaffyIO Widget #
Create a new Windows widget that will use the given Pager as its source of events.
data WindowsConfig #
Constructors
| WindowsConfig | |
Fields
| |
truncatedGetActiveLabel :: Int -> TaffyIO Text #