taffybar
Copyright(c) Ivan A. Malison
LicenseBSD3-style (see LICENSE)
MaintainerIvan A. Malison
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

System.Taffybar.Hooks

Description

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

Synopsis

Documentation

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.

readDirectoryEntriesDefault :: TaffyIO (MultiMap String DesktopEntry) Source #

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

setTaffyLogFormatter :: String -> IO () Source #

Set the log formatter used in the taffybar process

updateDirectoryEntriesCache :: TaffyIO () Source #

Update the DesktopEntry cache every 60 seconds.

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.

newtype NetworkInfoChan Source #

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

Constructors

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

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.