This commit is contained in:
2025-12-01 06:45:17 -04:00
parent f50cc9928f
commit c8d6711466
17 changed files with 298 additions and 100 deletions
+10 -7
View File
@@ -24,9 +24,10 @@ export const AppsWindow = (mon: number) => {
const [results, setResults] = createState(getApps() as Array<AstalApps.Application>);
return <PopupWindow namespace="apps-window" layer={Astal.Layer.OVERLAY}
exclusivity={Astal.Exclusivity.IGNORE} monitor={mon} marginTop={64}
exclusivity={Astal.Exclusivity.IGNORE} monitor={mon} marginTop={64}
class={"apps-window"} orientation={Gtk.Orientation.VERTICAL}
cssBackgroundWindow="background: rgba(0, 0, 0, .2);"
cssBackgroundWindow="background: rgba(0, 0, 0, .2);" halign={Gtk.Align.FILL}
valign={Gtk.Align.FILL} hexpand vexpand
actionKeyPressed={(self, key) => {
const entry = getPopupWindowContainer(self).get_first_child()!
.get_first_child()!.get_first_child()! as Gtk.SearchEntry;
@@ -36,8 +37,8 @@ export const AppsWindow = (mon: number) => {
entry.grab_focus();
}}>
<Gtk.Box hexpand={false} halign={Gtk.Align.CENTER}>
<Gtk.SearchEntry hexpand={false} onSearchChanged={(self) => {
<Gtk.Box hexpand halign={Gtk.Align.CENTER}>
<Gtk.SearchEntry hexpand onSearchChanged={(self) => {
setResults(getAstalApps().fuzzy_query(self.text.trim()));
}} onStopSearch={(self) => (self.get_root() as Astal.Window)?.close()} />
</Gtk.Box>
@@ -46,9 +47,11 @@ export const AppsWindow = (mon: number) => {
hscrollbarPolicy={Gtk.PolicyType.NEVER} overlayScrolling
propagateNaturalHeight={false} hexpand vexpand>
<Gtk.Box hexpand={false} vexpand={false}>
<Gtk.FlowBox rowSpacing={60} columnSpacing={60} activateOnSingleClick
minChildrenPerLine={1} homogeneous onChildActivated={(_, child) =>
<Gtk.Box hexpand vexpand>
<Gtk.FlowBox orientation={Gtk.Orientation.HORIZONTAL}
rowSpacing={32} columnSpacing={32} activateOnSingleClick
minChildrenPerLine={4} maxChildrenPerLine={10} hexpand homogeneous
onChildActivated={(_, child) =>
child.get_child()!.activate() // pass activation to button
}>