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

Safe Haskell | None
Language | Haskell2010

System.Taffybar.Widget.SimpleClock

Synopsis

- textClockNew :: MonadIO m => Maybe TimeLocale -> String -> Double -> m Widget
- textClockNewWith :: MonadIO m => ClockConfig -> m Widget
- defaultClockConfig :: ClockConfig
- data ClockConfig = ClockConfig {
  - clockTimeZone :: Maybe TimeZone
  - clockTimeLocale :: Maybe TimeLocale
  - clockFormatString :: String
  - clockUpdateStrategy :: ClockUpdateStrategy
  }
- data ClockUpdateStrategy
  - = ConstantInterval Double
  - | RoundedTargetInterval Int Double

# Documentation

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.org/pango/stable/PangoMarkupFormat.html).

textClockNewWith :: MonadIO m => ClockConfig -> 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

- clockTimeZone :: Maybe TimeZone
- clockTimeLocale :: Maybe TimeLocale
- clockFormatString :: String
- clockUpdateStrategy :: ClockUpdateStrategy

#### Instances

Instances details

Eq ClockConfig Source # |
Instance details Defined in System.Taffybar.Widget.SimpleClock Methods (==) :: ClockConfig -> ClockConfig -> Bool Source # (/=) :: ClockConfig -> ClockConfig -> Bool Source #
Ord ClockConfig Source # |

Instance details

Defined in System.Taffybar.Widget.SimpleClock

Methods

compare :: ClockConfig -> ClockConfig -> Ordering Source #

(<) :: ClockConfig -> ClockConfig -> Bool Source #

(<=) :: ClockConfig -> ClockConfig -> Bool Source #

(>) :: ClockConfig -> ClockConfig -> Bool Source #

(>=) :: ClockConfig -> ClockConfig -> Bool Source #

max :: ClockConfig -> ClockConfig -> ClockConfig Source #

min :: ClockConfig -> ClockConfig -> ClockConfig Source #

Show ClockConfig Source # |
Instance details Defined in System.Taffybar.Widget.SimpleClock Methods showsPrec :: Int -> ClockConfig -> ShowS Source # show :: ClockConfig -> String Source # showList :: [ClockConfig] -> ShowS Source #

data ClockUpdateStrategy Source #

Constructors

ConstantInterval Double |
RoundedTargetInterval Int Double |

#### Instances

Instances details

Eq ClockUpdateStrategy Source # |
Instance details Defined in System.Taffybar.Widget.SimpleClock Methods (==) :: ClockUpdateStrategy -> ClockUpdateStrategy -> Bool Source # (/=) :: ClockUpdateStrategy -> ClockUpdateStrategy -> Bool Source #
Ord ClockUpdateStrategy Source # |

Instance details

Defined in System.Taffybar.Widget.SimpleClock

Methods

compare :: ClockUpdateStrategy -> ClockUpdateStrategy -> Ordering Source #

(<) :: ClockUpdateStrategy -> ClockUpdateStrategy -> Bool Source #

(<=) :: ClockUpdateStrategy -> ClockUpdateStrategy -> Bool Source #

(>) :: ClockUpdateStrategy -> ClockUpdateStrategy -> Bool Source #

(>=) :: ClockUpdateStrategy -> ClockUpdateStrategy -> Bool Source #

max :: ClockUpdateStrategy -> ClockUpdateStrategy -> ClockUpdateStrategy Source #

min :: ClockUpdateStrategy -> ClockUpdateStrategy -> ClockUpdateStrategy Source #

Show ClockUpdateStrategy Source # |
Instance details Defined in System.Taffybar.Widget.SimpleClock Methods showsPrec :: Int -> ClockUpdateStrategy -> ShowS Source # show :: ClockUpdateStrategy -> String Source # showList :: [ClockUpdateStrategy] -> ShowS Source #