summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-16 12:21:56 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-16 12:21:56 +1100
commitb825e976395992c423029dedbf1842545177c7b3 (patch)
tree8382cfe6e4ce01227922dea2cbf244344e0b6c69 /modules
parentosds: config show value (diff)
downloadcaelestia-shell-b825e976395992c423029dedbf1842545177c7b3.tar.gz
caelestia-shell-b825e976395992c423029dedbf1842545177c7b3.tar.bz2
caelestia-shell-b825e976395992c423029dedbf1842545177c7b3.zip
bar: active window show class in tooltip
Diffstat (limited to 'modules')
-rw-r--r--modules/bar.tsx8
1 files changed, 6 insertions, 2 deletions
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) {