Copyright | (c) Ivan A. Malison |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | Ivan A. Malison |
Stability | unstable |
Portability | unportable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides battery widgets that are queried using the UPower dbus service. To avoid duplicating all information requests for each battery widget displayed (if using a multi-head configuration or multiple battery widgets), these widgets use the BroadcastChan based system for receiving updates defined in System.Taffybar.Information.Battery.
Synopsis
- batteryIconNew :: TaffyIO Widget
- textBatteryNew :: String -> TaffyIO Widget
- textBatteryNewWithLabelAction :: (Label -> BatteryInfo -> TaffyIO ()) -> TaffyIO Widget
Documentation
textBatteryNew :: String -> TaffyIO Widget Source #
A simple textual battery widget. 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.
textBatteryNewWithLabelAction :: (Label -> BatteryInfo -> TaffyIO ()) -> TaffyIO Widget Source #
Like textBatteryNew
but provides a more general way to update the label
widget. The argument provided is an action that is used to update the text
label given a BatteryInfo
object describing the state of the battery.