no notifactinosn from ags cuas they look ugly lol

This commit is contained in:
joy 2024-08-21 22:33:10 +02:00
parent bf75655263
commit 8566c48f47
2 changed files with 0 additions and 26 deletions

View file

@ -1,5 +1,4 @@
const hyprland = await Service.import("hyprland") const hyprland = await Service.import("hyprland")
const notifications = await Service.import("notifications")
const mpris = await Service.import("mpris") const mpris = await Service.import("mpris")
const audio = await Service.import("audio") const audio = await Service.import("audio")
const battery = await Service.import("battery") const battery = await Service.import("battery")
@ -9,10 +8,6 @@ const date = Variable("", {
poll: [1000, 'date "+%H:%M:%S %b %e."'], poll: [1000, 'date "+%H:%M:%S %b %e."'],
}) })
// widgets can be only assigned as a child in one container
// so to make a reuseable widget, make it a function
// then you can simply instantiate one by calling it
function Workspaces() { function Workspaces() {
const activeId = hyprland.active.workspace.bind("id") const activeId = hyprland.active.workspace.bind("id")
const workspaces = hyprland.bind("workspaces") const workspaces = hyprland.bind("workspaces")
@ -45,23 +40,6 @@ function Clock() {
} }
// we don't need dunst or any other notification daemon
// because the Notifications module is a notification daemon itself
function Notification() {
const popups = notifications.bind("popups")
return 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 || ""),
}),
],
})
}
function Media() { function Media() {
@ -172,7 +150,6 @@ function Center() {
spacing: 8, spacing: 8,
children: [ children: [
Media(), Media(),
Notification(),
], ],
}) })
} }

View file

@ -1,3 +0,0 @@
warning: Git tree '/home/joy/nix' is dirty
building the system configuration...
warning: Git tree '/home/joy/nix' is dirty