bar: active window show class in tooltip
This commit is contained in:
parent
f2945d0715
commit
b825e97639
1 changed files with 6 additions and 2 deletions
|
|
@ -41,8 +41,12 @@ const ActiveWindow = () => (
|
||||||
hasTooltip
|
hasTooltip
|
||||||
className="module active-window"
|
className="module active-window"
|
||||||
setup={self => {
|
setup={self => {
|
||||||
const title = Variable(hyprland.focusedClient?.title ?? "");
|
const title = Variable("");
|
||||||
hookFocusedClientProp(self, "title", c => title.set(c?.title ?? ""));
|
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));
|
const window = setupCustomTooltip(self, bind(title));
|
||||||
if (window) {
|
if (window) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue