xmobar

Portabilityunportable
Stabilityunstable
MaintainerJose A. Ortega Ruiz <jao@gnu.org>
Safe HaskellNone

Plugins

Description

This module exports the API for plugins.

Have a look at Plugins/HelloWorld.hs

Synopsis

Documentation

class Show e => Exec e where

Methods

alias :: e -> String

rate :: e -> Int

run :: e -> IO String

start :: e -> (String -> IO ()) -> IO ()

trigger :: e -> (Maybe SignalType -> IO ()) -> IO ()

tenthSeconds :: Int -> IO ()

Work around to the Int max bound: since threadDelay takes an Int, it is not possible to set a thread delay grater than about 45 minutes. With a little recursion we solve the problem.

readFileSafe :: FilePath -> IO String

hGetLineSafe :: Handle -> IO String