From 88489d4a43fef7896d8df8d27e15fdf4b03eb01e Mon Sep 17 00:00:00 2001 From: matt1432 Date: Fri, 29 Mar 2024 17:12:48 -0400 Subject: [PATCH] fix(ags): hide current window name when unfocused --- modules/ags/config/ts/bar/items/current-window.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/ags/config/ts/bar/items/current-window.ts b/modules/ags/config/ts/bar/items/current-window.ts index 9425749..56dbb10 100644 --- a/modules/ags/config/ts/bar/items/current-window.ts +++ b/modules/ags/config/ts/bar/items/current-window.ts @@ -18,10 +18,7 @@ export default () => Box({ const app = Applications .query(Hyprland.active.client.class)[0]; - if (app) { - self.icon = app.icon_name || ''; - self.visible = Hyprland.active.client.title !== ''; - } + self.icon = app?.icon_name || ''; }), Separator(SPACING), @@ -32,4 +29,6 @@ export default () => Box({ label: Hyprland.active.client.bind('title'), }), ], +}).hook(Hyprland.active.client, (self) => { + self.visible = Hyprland.active.client.title !== ''; });