From c8273e71ef4e722845118221e809c008b1391d8f Mon Sep 17 00:00:00 2001 From: RllyNotDev <88280211+rllynotfox@users.noreply.github.com> Date: Sat, 10 May 2025 00:44:24 +0300 Subject: [PATCH] Fix title on workspace change --- .config/ags/modules/bar/normal/spaceleft.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.config/ags/modules/bar/normal/spaceleft.js b/.config/ags/modules/bar/normal/spaceleft.js index 377d64cd3..d7f861271 100644 --- a/.config/ags/modules/bar/normal/spaceleft.js +++ b/.config/ags/modules/bar/normal/spaceleft.js @@ -29,9 +29,14 @@ const WindowTitle = async () => { truncate: 'end', maxWidthChars: 1, // Doesn't matter, just needs to be non negative className: 'txt-smallie bar-wintitle-txt', - setup: (self) => self.hook(Hyprland.active.client, label => { // Hyprland.active.client - label.label = Hyprland.active.client.title.length === 0 ? `Workspace ${Hyprland.active.workspace.id}` : Hyprland.active.client.title; - }), + setup: (self) => { + self.hook(Hyprland.active.client, label => { // Hyprland.active.client + label.label = Hyprland.active.client.title.length === 0 ? `Workspace ${Hyprland.active.workspace.id}` : Hyprland.active.client.title; + }); + self.hook(Hyprland.active.workspace, label => { // Hyprland.active.client + label.label = Hyprland.active.client.title.length === 0 ? `Workspace ${Hyprland.active.workspace.id}` : Hyprland.active.client.title; + }); + } }) ] })