From 113bd1ae88f48d3cef9cedffd24001714e1c3b3e Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 24 Sep 2023 13:17:52 -0400 Subject: [PATCH] fix(ags overview): turn off special workspace when clicking on other window --- config/ags/js/overview/clients.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/ags/js/overview/clients.js b/config/ags/js/overview/clients.js index 7190dbcd..746d90df 100644 --- a/config/ags/js/overview/clients.js +++ b/config/ags/js/overview/clients.js @@ -45,8 +45,10 @@ const Client = (client, active, clients) => Revealer({ } else { // close special workspace if one is opened - let currentActive = clients.find(c => c.class === Hyprland.active.client.class) - if (currentActive.workspace.id < 0) + let activeAddress = Hyprland.active.client.address; + let currentActive = clients.find(c => c.address === activeAddress) + + if (currentActive && currentActive.workspace.id < 0) execAsync(`hyprctl dispatch togglespecialworkspace ${String(currentActive.workspace.name) .replace('special:', '')}`).catch(print); execAsync(`hyprctl dispatch focuswindow address:${client.address}`)