taffybar-4.1.0: A desktop bar similar to xmobar, but with more GUI
Copyright(c) Ivan A. Malison
LicenseBSD3-style (see LICENSE)
MaintainerIvan A. Malison
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Taffybar.Hooks

Description

This module provides various startup hooks that can be added to TaffybarConfig.

Synopsis

Documentation

newtype NetworkInfoChan Source #

The type of the channel that provides network information in taffybar.

Constructors

NetworkInfoChan (TChan [(String, (Rational, Rational))]) 

buildNetworkInfoChan :: Double -> IO NetworkInfoChan Source #

Build a NetworkInfoChan that refreshes at the provided interval.

getNetworkChan :: TaffyIO NetworkInfoChan Source #

Get the NetworkInfoChan from Context, creating it if it does not exist.

setTaffyLogFormatter :: String -> IO () Source #

Set the log formatter used in the taffybar process

withBatteryRefresh :: TaffybarConfig -> TaffybarConfig Source #

Add refreshBatteriesOnPropChange to the startupHook of the provided TaffybarConfig. Use this if your system has issues with the battery widget not updating or reporting the incorrect state.

This function withBatteryRefresh is not normally needed because the battery widget already subscribes to updates from UPower, and UPower usually works correctly.

readDirectoryEntriesDefault :: TaffyIO (MultiMap String DesktopEntry) Source #

Read DesktopEntry values into a Multimap, where they are indexed by the class name specified in the DesktopEntry.

updateDirectoryEntriesCache :: TaffyIO () Source #

Update the DesktopEntry cache every 60 seconds.

refreshBatteriesOnPropChange :: TaffyIO () Source #

Call "refreshAllBatteries" whenever the BatteryInfo for the DisplayDevice is updated. This handles cases where there is a race between the signal that something is updated and the update actually being visible. See https://github.com/taffybar/taffybar/issues/330 for more details.