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

Safe Haskell | None
Language | Haskell2010

System.Taffybar.Widget.SimpleClock

Description

This module implements a very simple text-based clock widget. The widget also toggles a calendar widget when clicked. This calendar is not fancy at all and has no data backend.

Synopsis

- textClockNew :: MonadIO m => Maybe TimeLocale -> String -> Double -> m Widget
- textClockNewWith :: MonadIO m => ClockConfig -> String -> Double -> m Widget
- defaultClockConfig :: ClockConfig
- data ClockConfig = ClockConfig {
  - clockTimeZone :: Maybe TimeZone
  - clockTimeLocale :: Maybe TimeLocale
  }

# 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.orgpangostablePangoMarkupFormat.html).

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

Instances

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 #