From 8540e7187689e9d450d43f39a0d6ea75ad3f06ce Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:13:38 +0700 Subject: [PATCH] overview: fix workospaces > 5 --- .config/ags/widgets/overview/overview_hyprland.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/ags/widgets/overview/overview_hyprland.js b/.config/ags/widgets/overview/overview_hyprland.js index 1ed3bd40..1b291abc 100644 --- a/.config/ags/widgets/overview/overview_hyprland.js +++ b/.config/ags/widgets/overview/overview_hyprland.js @@ -217,7 +217,7 @@ const Workspace = (index) => { widget.set = (clientJson) => { // if(clientMap.get(clientJson.address)) clientMap.get(clientJson.address).destroy(); const newWindow = Window(clientJson); - if(newWindow === null) return; + if (newWindow === null) return; // clientMap.set(clientJson.address, newWindow); fixed.put(newWindow, Math.max(0, clientJson.at[0] * OVERVIEW_SCALE), @@ -256,7 +256,7 @@ const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) => kids.forEach(kid => kid.clear()); for (let i = 0; i < allClients.length; i++) { const client = allClients[i]; - if (offset + startWorkspace <= client.workspace.id && client.workspace.id <= offset + workspaces) { + if (offset + startWorkspace <= client.workspace.id && client.workspace.id <= offset + startWorkspace + workspaces) { kids[client.workspace.id - (offset + startWorkspace)] .set(client); } @@ -299,7 +299,7 @@ export default () => Widget.Revealer({ children: Array.from({ length: NUM_OF_WORKSPACE_ROWS }, (_, index) => OverviewRow({ startWorkspace: 1 + index * NUM_OF_WORKSPACE_COLS, - workspaces: NUM_OF_WORKSPACE_COLS + workspaces: NUM_OF_WORKSPACE_COLS, }) ) }),