summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-14 14:00:54 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-14 14:00:54 +0800
commit2a7858d900f7105e9833e78b1482639218e384c2 (patch)
treebacbe5abb21cd81fe4ba597cf48e22cf5fc561b8
parent3d253d23f6224d40ca2c727431eca6d7d342caf6 (diff)
activewindow: hide when not seen
-rw-r--r--bar/ActiveWindow.qml7
1 files changed, 6 insertions, 1 deletions
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
}
}
}