taffybar-4.0.1: 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 | Safe-Inferred
Language | Haskell2010

System.Taffybar.Widget.SNITray

Description

This module exports functions for the construction of StatusNotifierItem/AppIndicator tray widgets, supplied by the StatusNotifier.Tray module from the gtk-sni-tray library. These widgets do not support the older XEMBED protocol, although bridges like xembed-sni-proxy do allow sni trays to provide limited support for XEMBED tray icons.

Unless `sniTrayThatStartsWatcherEvenThoughThisIsABadWayToDoIt` is used it is necessary to run status-notifier-watcher from the status-notifier-item package before starting taffybar when using the functions defined in this module. Using `sniTrayThatStartsWatcherEvenThoughThisIsABadWayToDoIt` is generally not recommended, because it can lead to issues with the registration of tray icons if taffybar crashes/restarts, or if tray icon providing applications are ever started before taffybar.

Synopsis

- data TrayParams
- sniTrayNew :: TaffyIO Widget
- sniTrayNewFromParams :: TrayParams -> TaffyIO Widget
- getTrayHost :: Bool -> TaffyIO Host
- sniTrayNewFromHostParams :: TrayParams -> Host -> TaffyIO Widget
- sniTrayThatStartsWatcherEvenThoughThisIsABadWayToDoIt :: TaffyIO Widget

# Documentation

data TrayParams Source #

sniTrayNew :: TaffyIO Widget Source #

Build a new StatusNotifierItem tray that will share a host with any other trays that are constructed automatically

sniTrayNewFromParams :: TrayParams -> TaffyIO Widget Source #

Build a new StatusNotifierItem tray from the provided `TrayParams`.

getTrayHost :: Bool -> TaffyIO Host Source #

Get a `Host` from `TaffyIO` internal state, that can be used to construct SNI tray widgets. The boolean parameter determines whether or not a watcher will be started the first time `getTrayHost` is invoked.

sniTrayNewFromHostParams :: TrayParams -> Host -> TaffyIO Widget Source #

Build a new StatusNotifierItem tray from the provided `TrayParams` and `Host`.

sniTrayThatStartsWatcherEvenThoughThisIsABadWayToDoIt :: TaffyIO Widget Source #

Build a new StatusNotifierItem tray that also starts its own watcher, without depending on status-notifier-icon. This will not register applets started before the watcher is started.