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

Copyright | (c) Ulf Jasper
License | BSD3-style (see LICENSE)
Maintainer | Ulf Jasper <ulf.jasper@web.de>
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Taffybar.Widget.SimpleCommandButton

Contents

- Usage

Description

Simple button which runs a user defined command when being clicked

Synopsis

- simpleCommandButtonNew :: MonadIO m => Text -> Text -> m Widget

# Usage

In order to use this widget add the following line to your `taffybar.hs` file:

    import System.Taffybar.Widget
    main = do
      let cmdButton = simpleCommandButtonNew "Hello World!" "xterm -e \"echo Hello World!; read x\""

Now you can use `cmdButton` like any other Taffybar widget.

simpleCommandButtonNew Source #

Arguments

:: MonadIO m |
=> Text | Contents of the button's label.
-> Text | Command to execute. Should be in $PATH or an absolute path
-> m Widget |

Creates a new simple command button.