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

Safe Haskell | None

System.Taffybar.Widgets.PollingBar

Contents

- Types
- Constructors and accessors

Description

Like the vertical bar, but this widget automatically updates itself with a callback at fixed intervals.

Synopsis

- data VerticalBarHandle
- data BarConfig = BarConfig {
  - barBorderColor :: (Double, Double, Double)
  - barBackgroundColor :: (Double, Double, Double)
  - barColor :: Double -> (Double, Double, Double)
  - barPadding :: Int
  - barWidth :: Int
  - barDirection :: BarDirection
  }
- data BarDirection
  - = HORIZONTAL
  - | VERTICAL
- pollingBarNew :: BarConfig -> Double -> IO Double -> IO Widget
- defaultBarConfig :: (Double -> (Double, Double, Double)) -> BarConfig

# Types

data VerticalBarHandle Source

data BarConfig Source

Constructors

BarConfig |

Fields

barBorderColor :: (Double, Double, Double)

  Color of the border drawn around the widget

barBackgroundColor :: (Double, Double, Double)

  The background color of the widget

barColor :: Double -> (Double, Double, Double)

  A function to determine the color of the widget for the current data point

barPadding :: Int

  Number of pixels of padding around the widget

barWidth :: Int
barDirection :: BarDirection

data BarDirection Source

Constructors

HORIZONTAL |
VERTICAL |

# Constructors and accessors

pollingBarNew :: BarConfig -> Double -> IO Double -> IO Widget Source

defaultBarConfig :: (Double -> (Double, Double, Double)) -> BarConfig Source

A default bar configuration. The color of the active portion of the bar must be specified.