💥 fix(ags/bar): fix FocusedClient widget to update client title and class automatically

This commit is contained in:
retrozinndev
2025-02-12 16:39:31 -03:00
parent 6ed8194105
commit 06c502354f
+6 -6
View File
@@ -24,20 +24,20 @@ export function FocusedClient() {
orientation: Gtk.Orientation.VERTICAL,
homogeneous: false,
valign: Gtk.Align.CENTER,
children: [
children: bind(hyprland, "focusedClient").as((focusedClient: AstalHyprland.Client) =>
focusedClient ? [
new Widget.Label({
className: "class",
xalign: 0,
label: bind(hyprland, "focusedClient").as((client: AstalHyprland.Client) =>
client ? client.class : "")
label: bind(focusedClient, "class")
} as Widget.LabelProps),
new Widget.Label({
className: "title",
xalign: 0,
label: bind(hyprland, "focusedClient").as((client: AstalHyprland.Client) =>
client ? client.title : "")
label: bind(focusedClient, "title")
} as Widget.LabelProps)
]
] : []
)
})
]
} as Widget.BoxProps);