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

Safe Haskell | None
Language | Haskell2010

System.Taffybar.FreedesktopNotifications

Contents

- Types
- Constructor

Description

This widget listens on DBus for freedesktop notifications (http:/developer.gnome.orgnotification-spec/). Currently it is somewhat ugly, but the format is somewhat configurable. A visual overhaul of the widget is coming.

The widget only displays one notification at a time and notifications are cancellable.

Synopsis

- data Notification = Notification {
  - noteAppName :: Text
  - noteReplaceId :: Word32
  - noteSummary :: Text
  - noteBody :: Text
  - noteExpireTimeout :: Int32
  - noteId :: Word32
  }
- data NotificationConfig = NotificationConfig {
  - notificationMaxTimeout :: Int
  - notificationMaxLength :: Int
  - notificationFormatter :: Notification -> String
  }
- notifyAreaNew :: NotificationConfig -> IO Widget
- defaultNotificationConfig :: NotificationConfig

# Types

data Notification Source

A simple structure representing a Freedesktop notification

Constructors

Notification |

Fields

noteAppName :: Text
noteReplaceId :: Word32
noteSummary :: Text
noteBody :: Text
noteExpireTimeout :: Int32
noteId :: Word32

Instances

Eq Notification Source |
Show Notification Source |

data NotificationConfig Source

Constructors

NotificationConfig |

Fields

notificationMaxTimeout :: Int

  Maximum time that a notification will be displayed (in seconds). Default: 10

notificationMaxLength :: Int

  Maximum length displayed, in characters. Default: 50

notificationFormatter :: Notification -> String

  Function used to format notifications

# Constructor

notifyAreaNew :: NotificationConfig -> IO Widget Source

Create a new notification area with the given configuration.

defaultNotificationConfig :: NotificationConfig Source

The default formatter is one of

- Summary : Body
- Summary

depending on the presence of a notification body.