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.Hooks
Description
This module provides various startup hooks that can be added to
TaffybarConfig
.
Synopsis
- module System.Taffybar.DBus
- newtype NetworkInfoChan = NetworkInfoChan (TChan [(String, (Rational, Rational))])
- buildNetworkInfoChan :: Double -> IO NetworkInfoChan
- getNetworkChan :: TaffyIO NetworkInfoChan
- setTaffyLogFormatter :: String -> IO ()
- withBatteryRefresh :: TaffybarConfig -> TaffybarConfig
- getDirectoryEntriesByClassName :: TaffyIO (MultiMap String DesktopEntry)
- readDirectoryEntriesDefault :: TaffyIO (MultiMap String DesktopEntry)
- updateDirectoryEntriesCache :: TaffyIO ()
- data ChromeTabImageData = ChromeTabImageData {}
- getChromeTabImageDataChannel :: TaffyIO (TChan ChromeTabImageData)
- getChromeTabImageDataTable :: TaffyIO (MVar (Map Int ChromeTabImageData))
- getX11WindowToChromeTabId :: TaffyIO X11WindowToChromeTabId
- refreshBatteriesOnPropChange :: TaffyIO ()
Documentation
module System.Taffybar.DBus
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.
getDirectoryEntriesByClassName :: TaffyIO (MultiMap String DesktopEntry) Source #
Load the DesktopEntry
cache from Context
state.
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.
data ChromeTabImageData Source #
Constructors
ChromeTabImageData | |
Fields
|
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.