Files
colorshell/ags/widget/bar/Apps.ts
T
2025-04-23 20:42:10 -03:00

21 lines
763 B
TypeScript

import { Gtk, Widget } from "astal/gtk3";
import { tr } from "../../i18n/intl";
import { Windows } from "../../windows";
import { bind } from "astal";
export function Apps(): Gtk.Widget {
return new Widget.EventBox({
onClickRelease: () => Windows.open("apps-window"),
className: bind(Windows, "openWindows").as((openWindows) =>
Object.hasOwn(openWindows, "apps-window") ? "apps open" : "apps"),
child: new Widget.Box({
child: new Widget.Icon({
tooltipText: tr("apps"),
icon: "applications-other-symbolic",
halign: Gtk.Align.CENTER,
hexpand: true
} as Widget.IconProps)
} as Widget.BoxProps)
} as Widget.EventBoxProps);
}