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] -> 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
- 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
- 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 |
-> 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
Eq Notification Source # | |
Show Notification Source # | |
Defined in System.Taffybar.Widget.FreedesktopNotifications Methods showsPrec :: Int -> Notification -> ShowS # show :: Notification -> String # showList :: [Notification] -> ShowS # |
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 #
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
data ClockConfig Source #
Constructors
ClockConfig | |
Fields |
Instances
Eq ClockConfig Source # | |
Defined in System.Taffybar.Widget.SimpleClock | |
Ord ClockConfig Source # | |
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 Source # | |
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 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 WeatherInfo Source #
Constructors
WI | |
Instances
Show WeatherInfo Source # | |
Defined in System.Taffybar.Widget.Weather Methods showsPrec :: Int -> WeatherInfo -> ShowS # show :: WeatherInfo -> String # showList :: [WeatherInfo] -> ShowS # |
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
|