diff options
Diffstat (limited to 'modules/bar')
| -rw-r--r-- | modules/bar/Bar.qml | 2 | ||||
| -rw-r--r-- | modules/bar/components/ActiveWindow.qml | 4 | ||||
| -rw-r--r-- | modules/bar/components/workspaces/Workspace.qml | 6 | ||||
| -rw-r--r-- | modules/bar/popouts/ActiveWindow.qml | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 1d0db8d..9f5509b 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -101,7 +101,7 @@ Item { anchors.rightMargin: -Config.border.thickness onWheel: event => { - const activeWs = Hyprland.activeClient?.workspace?.name; + const activeWs = Hyprland.activeToplevel?.workspace?.name; if (activeWs?.startsWith("special:")) Hyprland.dispatch(`togglespecialworkspace ${activeWs.slice(8)}`); else if (event.angleDelta.y < 0 || Hyprland.activeWsId > 1) diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml index f6204ae..fc0c303 100644 --- a/modules/bar/components/ActiveWindow.qml +++ b/modules/bar/components/ActiveWindow.qml @@ -60,7 +60,7 @@ Item { id: icon animate: true - text: Icons.getAppCategoryIcon(Hyprland.activeClient?.wmClass, "desktop_windows") + text: Icons.getAppCategoryIcon(Hyprland.activeToplevel?.lastIpcObject.class, "desktop_windows") color: root.colour anchors.horizontalCenter: parent.horizontalCenter @@ -77,7 +77,7 @@ Item { TextMetrics { id: metrics - text: Hyprland.activeClient?.title ?? qsTr("Desktop") + text: Hyprland.activeToplevel?.title ?? qsTr("Desktop") font.pointSize: Appearance.font.size.smaller font.family: Appearance.font.family.mono elide: Qt.ElideRight diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml index dba0f86..0e0fcc9 100644 --- a/modules/bar/components/workspaces/Workspace.qml +++ b/modules/bar/components/workspaces/Workspace.qml @@ -76,14 +76,14 @@ Item { Repeater { model: ScriptModel { - values: Hyprland.clients.filter(c => c.workspace?.id === root.ws) + values: Hyprland.toplevels.values.filter(c => c.workspace?.id === root.ws) } MaterialIcon { - required property Hyprland.Client modelData + required property var modelData grade: 0 - text: Icons.getAppCategoryIcon(modelData.wmClass, "terminal") + text: Icons.getAppCategoryIcon(modelData.lastIpcObject.class, "terminal") color: Colours.palette.m3onSurfaceVariant } } diff --git a/modules/bar/popouts/ActiveWindow.qml b/modules/bar/popouts/ActiveWindow.qml index bbb2d7a..9575dde 100644 --- a/modules/bar/popouts/ActiveWindow.qml +++ b/modules/bar/popouts/ActiveWindow.qml @@ -12,7 +12,7 @@ Item { required property Item wrapper - implicitWidth: Hyprland.activeClient ? child.implicitWidth : -Appearance.padding.large * 2 + implicitWidth: Hyprland.activeToplevel ? child.implicitWidth : -Appearance.padding.large * 2 implicitHeight: child.implicitHeight Column { @@ -33,7 +33,7 @@ Item { Layout.alignment: Qt.AlignVCenter implicitSize: details.implicitHeight - source: Icons.getAppIcon(Hyprland.activeClient?.wmClass ?? "", "image-missing") + source: Icons.getAppIcon(Hyprland.activeToplevel?.lastIpcObject.class ?? "", "image-missing") } ColumnLayout { @@ -44,14 +44,14 @@ Item { StyledText { Layout.fillWidth: true - text: Hyprland.activeClient?.title ?? "" + text: Hyprland.activeToplevel?.title ?? "" font.pointSize: Appearance.font.size.normal elide: Text.ElideRight } StyledText { Layout.fillWidth: true - text: Hyprland.activeClient?.wmClass ?? "" + text: Hyprland.activeToplevel?.lastIpcObject.class ?? "" color: Colours.palette.m3onSurfaceVariant elide: Text.ElideRight } @@ -91,7 +91,7 @@ Item { ScreencopyView { id: preview - captureSource: Hyprland.activeClient ? ToplevelManager.activeToplevel : null + captureSource: Hyprland.activeToplevel?.wayland ?? null live: visible constraintSize.width: Config.bar.sizes.windowPreviewSize |