taffybar-4.0.1: A desktop bar similar to xmobar, but with more GUI
Copyright(c) Ivan A. Malison
LicenseBSD3-style (see LICENSE)
MaintainerIvan A. Malison
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Taffybar.Widget.Battery

Description

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

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.