From df5b1ed4157e5098cc59bc4b4b11c714009e91a6 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 3 Oct 2024 11:50:42 -0400 Subject: [PATCH] fix(agsV2): init workspaces at start --- nixosModules/ags/v2/widgets/bar/items/workspaces.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nixosModules/ags/v2/widgets/bar/items/workspaces.tsx b/nixosModules/ags/v2/widgets/bar/items/workspaces.tsx index bc836908..0546411b 100644 --- a/nixosModules/ags/v2/widgets/bar/items/workspaces.tsx +++ b/nixosModules/ags/v2/widgets/bar/items/workspaces.tsx @@ -142,7 +142,7 @@ export default () => { }); }; - self.hook(Hyprland, 'event', () => { + const updateAll = () => { workspaces = (self.children as Widget.Revealer[]) .filter((ch) => { return Hyprland.get_workspaces().find((ws) => { @@ -158,7 +158,10 @@ export default () => { const TEMP_TIMEOUT = 100; timeout(TEMP_TIMEOUT, () => updateHighlight(highlight)); - }); + }; + + updateAll(); + self.hook(Hyprland, 'event', updateAll); }} />