SFWBAR-NCENTER(1)

๐Ÿ“ฆ
version 1.0~beta16.1 ยท 4 versions
, in fedora 43

โœจ NAME โœจ

okay bestie, meet sfwbar-ncenter โ€” it's the Sfwbar Notification Center module, aka the lil glow-up that gives your bar a whole desktop notification host ๐Ÿ’–

  • Filename: ncenter.so
  • Requires: none โ€” she's self-sufficient, no cap ๐Ÿ‘‘

๐ŸŒธ SYNOPSIS ๐ŸŒธ

The notification center module provides desktop notification host. that's it, that's the vibe โ€” she hosts your notifications like the main character she is ๐ŸŽ€


๐Ÿฆ‹ EXPRESSION FUNCTIONS ๐Ÿฆ‹

๐Ÿ’… NotificationGet(Property)

NotificationGet fetches a property for a currently advertised notification. the supported properties are literally these, no substitutions:

  • "id" โ€” an id of a notification. this is used as a unique id to track changes to or destruction of the notification. your ride-or-die tracker fr ๐Ÿ”ฅ
  • "removed-id" โ€” an id of the most recently removed notification. this gets populated upon emission of the "notification-removed" trigger. it's giving receipts ๐Ÿ’€
  • "icon" โ€” an icon associated with the notification. the aesthetic โœจ
  • "app" โ€” an app id of the program sending the notification.
  • "summary" โ€” a summary text of the notification.
  • "body" โ€” the body of the notification. the whole essay, bestie ๐Ÿ“
  • "time" โ€” the time when the notification was generated.
  • "category" โ€” a category of the notification.
  • "action_id" โ€” an id of the currently exposed action.
  • "action_title" โ€” the title of the currently exposed action.

๐ŸŽ€ NotificationGroup(id)

Query group expansion state for a given notification id. possible return values are:

  • <blank> โ€” if the notification group is not expanded
  • 'header' โ€” if this is a header of the expanded notification
  • 'sole' โ€” if the group is expanded, but this is the sole notification in the group ๐Ÿฅบ

๐Ÿ’œ NotificationActiveGroup()

Query the app_id of the currently expanded notification group. who's the main character rn? this tells u ๐Ÿ‘‘

๐ŸŒˆ NotificationCount([id])

Get count of the notifications. if the id is specified, this function returns the number of notification for the app id of the notification referenced by the id โ€” otherwise it will return the total count of notifications. math but make it cute ๐Ÿงฎ


๐Ÿ”ฅ ACTIONS ๐Ÿ”ฅ

โญ NotificationAck

Notify the module that all information for the currently advertised notification has been processed. the module may then emit another notification-updated event if further notification updates are available. basically "okay girl i read it, next" ๐Ÿ’–

๐Ÿ’– NotificationAckRemoved

Notify the module that all information for the currently advertised notification removal has been processed. the module may then emit another notification-removed event if further notification removals are queued.

๐ŸŽ€ NotificationClose <id>

Close a notification with a specified id. bye bestie, it's not you it's me ๐Ÿซถ

๐ŸŒธ NotificationExpand <id>

Expand a notification group to which notification referenced by id belongs. open up, we're yapping ๐Ÿ“ข

๐Ÿฆ‹ NotificationCollapse

Collapse the currently expanded notification group. no more yapping, closing the group chat ๐Ÿ™ˆ

๐Ÿ’… NotificationAction <id>, <action_id>

Activate an action action_id for notification id. hit the button, slay โœจ


๐Ÿ‘‘ TRIGGERS ๐Ÿ‘‘

The module defines the following triggers:

  • "notification-updated" โ€” this trigger is emitted when a new notification has been received or properties of a notification are changed. for a notification with multiple actions, this trigger is emitted once for every action. once the trigger is emitted, the information for the relevant notification will be available via NotificationGet expression function. once the config finished handling the notification update, it should call action NotificationAck. upon receipt of this action, the module may emit "notification-updated" again if further notification updates are queued. one notification, many plot twists ๐Ÿ’€
  • "notification-removed" โ€” this trigger is emitted when a notification is no longer available and should be removed from the layout. the id of the removed notification is available via NotificationGet("removed-id"). once the config finished removing the notification, it should call action NotificationAckRemoved. upon receipt of this action, the module may emit another "notification-removed" trigger if further notifications have been removed.
  • "notification-group" โ€” this trigger is emitted when grouping state of notifications changes. i.e. when any group is expanded or collapsed. the group state vibe check ๐ŸŒˆ

GPLv3+ โ€” free as in freedom, iconic behavior periodt ๐Ÿ’…


and that's the whole page bestie, no crumbs left ๐Ÿ“ โ€” this was sfwbar-ncenter from section 1 of the General Commands Manual. go forth and host those notifications, ur bar is gonna eat ๐Ÿ”ฅ๐Ÿ‘‘๐Ÿ’–

๐Ÿ“ฆ where this page comes from