Added workspaces, window titles, volume, bluetooth, systray and date/time modules to the panel
This commit is contained in:
24
modules/bar/notification/index.js
Normal file
24
modules/bar/notification/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const notifications = await Service.import("notifications");
|
||||
|
||||
// we don't need dunst or any other notification daemon
|
||||
// because the Notifications module is a notification daemon itself
|
||||
const Notification = () => {
|
||||
const popups = notifications.bind("popups");
|
||||
return {
|
||||
component: Widget.Box({
|
||||
class_name: "notification",
|
||||
visible: popups.as((p) => p.length > 0),
|
||||
children: [
|
||||
Widget.Icon({
|
||||
icon: "preferences-system-notifications-symbolic",
|
||||
}),
|
||||
Widget.Label({
|
||||
label: popups.as((p) => p[0]?.summary || ""),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
isVisible: false,
|
||||
};
|
||||
};
|
||||
|
||||
export { Notification };
|
||||
Reference in New Issue
Block a user