taffybar-4.0.1: 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 TaffyConfig.

Synopsis

Documentation

newtype NetworkInfoChan Source #

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

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 refreshrefreshBatteriesOnPropChange to the startupHook of the provided TaffybarConfig.

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.