From 2a7858d900f7105e9833e78b1482639218e384c2 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 14 Jul 2025 14:00:54 +0800 Subject: activewindow: hide when not seen --- bar/ActiveWindow.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml index 932ba4c..651b744 100644 --- a/bar/ActiveWindow.qml +++ b/bar/ActiveWindow.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Layouts import Quickshell import Quickshell.Hyprland +import Quickshell.Wayland import Quickshell.Widgets import qs.components import qs.config @@ -17,6 +18,10 @@ Rectangle { anchors.centerIn: parent color: Colors.alt + // according to docs, null could happen but doesn't seem to happen in practice so.. + // hypr toplevel.activated is always true and doesn't change either so.. + opacity: ToplevelManager.activeToplevel?.activated ? 1 : 0 + radius: Style.rounding.smaller RowLayout { @@ -35,7 +40,7 @@ Rectangle { IText { // TOOD: if not exist, use lazyloader or something hide this font.pixelSize: General.fontSize - text: root?.toplevel?.title || "" + text: root.toplevel.wayland.title } } } -- cgit v1.2.3