import "root:/modules/common" import "root:/modules/common/widgets" import QtQuick import QtQuick.Layouts import Quickshell.Wayland import Quickshell.Hyprland Item { required property var bar readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen) readonly property Toplevel activeWindow: ToplevelManager.activeToplevel property int preferredWidth: Appearance.sizes.barPreferredSideSectionWidth height: parent.height width: colLayout.width Layout.leftMargin: Appearance.rounding.screenRounding ColumnLayout { id: colLayout anchors.centerIn: parent spacing: -4 StyledText { font.pixelSize: Appearance.font.pixelSize.smaller color: Appearance.colors.colSubtext Layout.preferredWidth: preferredWidth elide: Text.ElideRight text: activeWindow?.activated ? activeWindow?.appId : qsTr("Desktop") } StyledText { font.pixelSize: Appearance.font.pixelSize.small color: Appearance.colors.colOnLayer0 Layout.preferredWidth: preferredWidth elide: Text.ElideRight text: activeWindow?.activated ? activeWindow?.title : `${qsTr("Workspace")} ${monitor.activeWorkspace?.id}` } } }