feat(bar/animations): add scale animation on apps button, fade animation on ws numbers

This commit is contained in:
retrozinndev
2025-03-25 15:58:27 -03:00
parent e2e84c93b5
commit 77ab94a723
6 changed files with 70 additions and 29 deletions
+5 -4
View File
@@ -7,11 +7,12 @@ export function Apps(): Gtk.Widget {
onClickRelease: () => Windows.getWindow("apps-window")?.show(),
className: "apps",
child: new Widget.Box({
child: new Widget.Label({
className: "nf",
child: new Widget.Icon({
tooltipText: tr("bar.apps.tooltip"),
label: ""
} as Widget.LabelProps)
icon: "applications-other-symbolic",
halign: Gtk.Align.CENTER,
hexpand: true
} as Widget.IconProps)
} as Widget.BoxProps)
} as Widget.EventBoxProps);
}
+6 -2
View File
@@ -19,8 +19,12 @@ export function Workspaces(): Gtk.Widget {
return sortedWorkspaces.map((workspace: AstalHyprland.Workspace) =>
new Widget.Button({
className: bind(hyprland, "focusedWorkspace").as(
(focusedWs: AstalHyprland.Workspace) => workspace.id === focusedWs.id ? "focus" : ""),
className: Variable.derive([
bind(hyprland, "focusedWorkspace"),
showWorkspaceNumbers()
], (focusedWs, showWsNumbers) =>
`${focusedWs.id === workspace.id ? "focus" : ""} ${showWsNumbers ? "show" : ""}`
)(),
visible: true,
tooltipText: bind(workspace, "lastClient").as((lastClient) => `Workspace ${workspace.id}${ lastClient ? ` - ${
!lastClient.title.toLowerCase().includes(lastClient.class) ?