Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This widget listens on DBus for freedesktop notifications (http://developer.gnome.org/notification-spec/). Currently it is somewhat ugly, but the format is somewhat configurable.
The widget only displays one notification at a time and notifications are cancellable.
The notificationDaemon thread handles new notifications and cancellation requests, adding or removing the notification to or from the queue. It additionally starts a timeout thread for each notification added to queue.
The display thread blocks idling until it is awakened to refresh the GUI
A timeout thread is associated with a notification id. It sleeps until the specific timeout and then removes every notification with that id from the queue
Synopsis
- data Notification = Notification {
- noteAppName :: Text
- noteReplaceId :: Word32
- noteSummary :: Text
- noteBody :: Text
- noteExpireTimeout :: Maybe Int32
- noteId :: Word32
- data NotificationConfig = NotificationConfig {}
- defaultNotificationConfig :: NotificationConfig
- notifyAreaNew :: MonadIO m => NotificationConfig -> m Widget
Documentation
data Notification Source #
A simple structure representing a Freedesktop notification
Notification | |
|
Instances
Show Notification Source # | |
Defined in System.Taffybar.Widget.FreedesktopNotifications showsPrec :: Int -> Notification -> ShowS # show :: Notification -> String # showList :: [Notification] -> ShowS # | |
Eq Notification Source # | |
Defined in System.Taffybar.Widget.FreedesktopNotifications (==) :: Notification -> Notification -> Bool # (/=) :: Notification -> Notification -> Bool # |
data NotificationConfig Source #
NotificationConfig | |
|
Instances
defaultNotificationConfig :: NotificationConfig Source #
The default formatter is one of * Summary : Body * Summary * (N) Summary : Body * (N) Summary depending on the presence of a notification body, and where N is the number of queued notifications.
notifyAreaNew :: MonadIO m => NotificationConfig -> m Widget Source #
Create a new notification area with the given configuration.