From b825e976395992c423029dedbf1842545177c7b3 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:21:56 +1100 Subject: bar: active window show class in tooltip --- modules/bar.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/bar.tsx b/modules/bar.tsx index 3e75deb..80f3d97 100644 --- a/modules/bar.tsx +++ b/modules/bar.tsx @@ -41,8 +41,12 @@ const ActiveWindow = () => ( hasTooltip className="module active-window" setup={self => { - const title = Variable(hyprland.focusedClient?.title ?? ""); - hookFocusedClientProp(self, "title", c => title.set(c?.title ?? "")); + const title = Variable(""); + const updateTooltip = (c: AstalHyprland.Client | null) => + title.set(c?.class && c?.title ? `${c.class}: ${c.title}` : ""); + hookFocusedClientProp(self, "class", updateTooltip); + hookFocusedClientProp(self, "title", updateTooltip); + updateTooltip(hyprland.focusedClient); const window = setupCustomTooltip(self, bind(title)); if (window) { -- cgit v1.2.3-freya