mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
fix active window title not showing
This commit is contained in:
@@ -6,12 +6,12 @@ import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Item {
|
||||
id: root
|
||||
required property var bar
|
||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen)
|
||||
readonly property Toplevel activeWindow: ToplevelManager.activeToplevel
|
||||
|
||||
height: parent.height
|
||||
width: colLayout.width
|
||||
implicitWidth: colLayout.implicitWidth
|
||||
|
||||
ColumnLayout {
|
||||
id: colLayout
|
||||
@@ -26,7 +26,7 @@ Item {
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
color: Appearance.colors.colSubtext
|
||||
elide: Text.ElideRight
|
||||
text: activeWindow?.activated ? activeWindow?.appId : qsTr("Desktop")
|
||||
text: root.activeWindow?.activated ? root.activeWindow?.appId : qsTr("Desktop")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
@@ -34,7 +34,7 @@ Item {
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
color: Appearance.colors.colOnLayer0
|
||||
elide: Text.ElideRight
|
||||
text: activeWindow?.activated ? activeWindow?.title : `${qsTr("Workspace")} ${monitor.activeWorkspace?.id}`
|
||||
text: root.activeWindow?.activated ? root.activeWindow?.title : `${qsTr("Workspace")} ${monitor.activeWorkspace?.id}`
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -176,9 +176,10 @@ Scope {
|
||||
}
|
||||
|
||||
ActiveWindow {
|
||||
visible: barRoot.useShortenedForm === 0 && width > 0 && height > 0
|
||||
visible: barRoot.useShortenedForm === 0
|
||||
Layout.rightMargin: Appearance.rounding.screenRounding
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
bar: barRoot
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user