taffybar-3.2.1: A desktop bar similar to xmobar, but with more GUI

Safe HaskellNone
LanguageHaskell2010

System.Taffybar.Widget.Generic.Icon

Description

This is a simple static image widget, and a polling image widget that updates its contents by calling a callback at a set interval.

Synopsis

Documentation

iconImageWidgetNew :: MonadIO m => FilePath -> m Widget Source #

Create a new widget that displays a static image

iconImageWidgetNew path

returns a widget with icon at path.

pollingIconImageWidgetNew Source #

Arguments

:: MonadIO m 
=> FilePath

Initial file path of the icon

-> Double

Update interval (in seconds)

-> IO FilePath

Command to run to get the input filepath

-> m Widget 

Create a new widget that updates itself at regular intervals. The function

pollingIconImageWidgetNew path interval cmd

returns a widget with initial icon at path. The widget forks a thread to update its contents every interval seconds. The command should return a FilePath of a valid icon.

If the IO action throws an exception, it will be swallowed and the label will not update until the update interval expires.