taffybar-0.1.2: A desktop bar similar to xmobar, but with more GUI

System.Taffybar.Battery

Description

This module provides battery widgets using the UPower system service.

Currently it reports only the first battery it finds. If it does not find a batterym it just returns an obnoxious widget with warning text in it. Battery hotplugging is not supported. These more advanced features could be supported if there is interest.

Synopsis

Documentation

batteryBarNew

Arguments

:: BarConfig

Configuration options for the bar display

-> Double

Polling period in seconds

-> IO Widget 

A fancy graphical battery widget that represents the current charge as a colored vertical bar. There is also a textual percentage readout next to the bar.

textBatteryNew

Arguments

:: String

Display format

-> Double

Poll period in seconds

-> IO Widget 

A simple textual battery widget that auto-updates once every polling period (specified in seconds). The displayed format is specified using a printf-style format string. The format string must have a single format argument: %d (and any number of %% sequences to insert a literal percent sign).

More, fewer, or different format arguments will result in a runtime error.

defaultBatteryConfig :: BarConfig

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