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

Copyright | (c) Ivan A. Malison
License | BSD3-style (see LICENSE)
Maintainer | Ivan A. Malison
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

System.Taffybar.SimpleConfig

Description

Synopsis

- data SimpleTaffyConfig = SimpleTaffyConfig {
  - monitorsAction :: TaffyIO [Int]
  - barHeight :: Int
  - barPadding :: Int
  - barPosition :: Position
  - widgetSpacing :: Int
  - startWidgets :: [TaffyIO Widget]
  - centerWidgets :: [TaffyIO Widget]
  - endWidgets :: [TaffyIO Widget]
  - cssPath :: Maybe FilePath
  - startupHook :: TaffyIO ()
  }
- data Position
  - = Top
  - | Bottom
- defaultSimpleTaffyConfig :: SimpleTaffyConfig
- simpleTaffybar :: SimpleTaffyConfig -> IO ()
- toTaffyConfig :: SimpleTaffyConfig -> TaffybarConfig
- useAllMonitors :: TaffyIO [Int]
- usePrimaryMonitor :: TaffyIO [Int]

# Documentation

data SimpleTaffyConfig Source #

A configuration object whose interface is simpler than that of `TaffybarConfig`. Unless you have a good reason to use taffybar's more advanced interface, you should stick to this one.

Constructors

SimpleTaffyConfig |

Fields

- monitorsAction :: TaffyIO [Int]

  The xinerama/xrandr monitor number to put the bar on (default: PrimaryMonitor)

- barHeight :: Int

  Number of pixels to reserve for the bar

- barPadding :: Int

  Number of additional pixels to reserve for the bar strut (default: 0)

- barPosition :: Position

  The position of the bar on the screen (default: Top)

- widgetSpacing :: Int

  The number of pixels between widgets

- startWidgets :: [TaffyIO Widget]

  Widget constructors whose output are placed at the beginning of the bar

- centerWidgets :: [TaffyIO Widget]

  Widget constructors whose output are placed in the center of the bar

- endWidgets :: [TaffyIO Widget]

  Widget constructors whose output are placed at the end of the bar

- cssPath :: Maybe FilePath

  Optional path to CSS stylesheet (loaded in addition to stylesheet found in XDG data directory).

- startupHook :: TaffyIO ()

  Hook to run at taffybar startup.

data Position Source #

The side of the monitor at which taffybar should be displayed.

Constructors

Top |
Bottom |

#### Instances

Instances details

Eq Position Source # |
Instance details Defined in System.Taffybar.SimpleConfig Methods (==) :: Position -> Position -> Bool Source # (/=) :: Position -> Position -> Bool Source #
Show Position Source # |
Instance details Defined in System.Taffybar.SimpleConfig Methods showsPrec :: Int -> Position -> ShowS Source # show :: Position -> String Source # showList :: [Position] -> ShowS Source #

defaultSimpleTaffyConfig :: SimpleTaffyConfig Source #

Sensible defaults for most of the fields of `SimpleTaffyConfig`. You'll need to specify the widgets you want in the bar with `startWidgets`, `centerWidgets` and `endWidgets`.

simpleTaffybar :: SimpleTaffyConfig -> IO () Source #

Start taffybar using `SimpleTaffybarConfig`.

toTaffyConfig :: SimpleTaffyConfig -> TaffybarConfig Source #

useAllMonitors :: TaffyIO [Int] Source #

Display a taffybar window on all monitors.

usePrimaryMonitor :: TaffyIO [Int] Source #

Display the taffybar window on the primary monitor.