summaryrefslogtreecommitdiff
path: root/modules/windowinfo/Details.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-27 21:46:24 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-27 21:46:24 +1000
commitbed6f7c5d5cd8f371524176c1fc7a55fe7ecc9bb (patch)
tree0853ca45f51e2c7f688f6ad8d62e18c953e9ef04 /modules/windowinfo/Details.qml
parentinternal: use hyprlandtoplevel (diff)
downloadcaelestia-shell-bed6f7c5d5cd8f371524176c1fc7a55fe7ecc9bb.tar.gz
caelestia-shell-bed6f7c5d5cd8f371524176c1fc7a55fe7ecc9bb.tar.bz2
caelestia-shell-bed6f7c5d5cd8f371524176c1fc7a55fe7ecc9bb.zip
internal: windowinfo pass in client
So it can be used for clients other than the active one Also fix text below screencopyview
Diffstat (limited to 'modules/windowinfo/Details.qml')
-rw-r--r--modules/windowinfo/Details.qml32
1 files changed, 17 insertions, 15 deletions
diff --git a/modules/windowinfo/Details.qml b/modules/windowinfo/Details.qml
index 2d60352..546ff28 100644
--- a/modules/windowinfo/Details.qml
+++ b/modules/windowinfo/Details.qml
@@ -1,20 +1,22 @@
import "root:/widgets"
import "root:/services"
import "root:/config"
-import Quickshell
+import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
ColumnLayout {
id: root
+ required property HyprlandToplevel client
+
anchors.fill: parent
spacing: Appearance.spacing.small
Label {
Layout.topMargin: Appearance.padding.large * 2
- text: Hyprland.activeToplevel?.title ?? qsTr("No active client")
+ text: root.client?.title ?? qsTr("No active client")
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
font.pointSize: Appearance.font.size.large
@@ -22,7 +24,7 @@ ColumnLayout {
}
Label {
- text: Hyprland.activeToplevel?.lastIpcObject.class ?? qsTr("No active client")
+ text: root.client?.lastIpcObject.class ?? qsTr("No active client")
color: Colours.palette.m3tertiary
font.pointSize: Appearance.font.size.larger
@@ -41,31 +43,31 @@ ColumnLayout {
Detail {
icon: "location_on"
- text: qsTr("Address: %1").arg(`0x${Hyprland.activeToplevel?.address}` ?? "unknown")
+ text: qsTr("Address: %1").arg(`0x${root.client?.address}` ?? "unknown")
color: Colours.palette.m3primary
}
Detail {
icon: "location_searching"
- text: qsTr("Position: %1, %2").arg(Hyprland.activeToplevel?.lastIpcObject.at[0] ?? -1).arg(Hyprland.activeToplevel?.lastIpcObject.at[1] ?? -1)
+ text: qsTr("Position: %1, %2").arg(root.client?.lastIpcObject.at[0] ?? -1).arg(root.client?.lastIpcObject.at[1] ?? -1)
}
Detail {
icon: "resize"
- text: qsTr("Size: %1 x %2").arg(Hyprland.activeToplevel?.lastIpcObject.size[0] ?? -1).arg(Hyprland.activeToplevel?.lastIpcObject.size[1] ?? -1)
+ text: qsTr("Size: %1 x %2").arg(root.client?.lastIpcObject.size[0] ?? -1).arg(root.client?.lastIpcObject.size[1] ?? -1)
color: Colours.palette.m3tertiary
}
Detail {
icon: "workspaces"
- text: qsTr("Workspace: %1 (%2)").arg(Hyprland.activeToplevel?.workspace.name ?? -1).arg(Hyprland.activeToplevel?.workspace.id ?? -1)
+ text: qsTr("Workspace: %1 (%2)").arg(root.client?.workspace.name ?? -1).arg(root.client?.workspace.id ?? -1)
color: Colours.palette.m3secondary
}
Detail {
icon: "desktop_windows"
text: {
- const mon = Hyprland.activeToplevel?.monitor;
+ const mon = root.client?.monitor;
if (mon)
return qsTr("Monitor: %1 (%2) at %3, %4").arg(mon.name).arg(mon.id).arg(mon.x).arg(mon.y);
return qsTr("Monitor: unknown");
@@ -74,42 +76,42 @@ ColumnLayout {
Detail {
icon: "page_header"
- text: qsTr("Initial title: %1").arg(Hyprland.activeToplevel?.lastIpcObject.initialTitle ?? "unknown")
+ text: qsTr("Initial title: %1").arg(root.client?.lastIpcObject.initialTitle ?? "unknown")
color: Colours.palette.m3tertiary
}
Detail {
icon: "category"
- text: qsTr("Initial class: %1").arg(Hyprland.activeToplevel?.lastIpcObject.initialClass ?? "unknown")
+ text: qsTr("Initial class: %1").arg(root.client?.lastIpcObject.initialClass ?? "unknown")
}
Detail {
icon: "account_tree"
- text: qsTr("Process id: %1").arg(Hyprland.activeToplevel?.lastIpcObject.pid ?? -1)
+ text: qsTr("Process id: %1").arg(root.client?.lastIpcObject.pid ?? -1)
color: Colours.palette.m3primary
}
Detail {
icon: "picture_in_picture_center"
- text: qsTr("Floating: %1").arg(Hyprland.activeToplevel?.lastIpcObject.floating ? "yes" : "no")
+ text: qsTr("Floating: %1").arg(root.client?.lastIpcObject.floating ? "yes" : "no")
color: Colours.palette.m3secondary
}
Detail {
icon: "gradient"
- text: qsTr("Xwayland: %1").arg(Hyprland.activeToplevel?.lastIpcObject.xwayland ? "yes" : "no")
+ text: qsTr("Xwayland: %1").arg(root.client?.lastIpcObject.xwayland ? "yes" : "no")
}
Detail {
icon: "keep"
- text: qsTr("Pinned: %1").arg(Hyprland.activeToplevel?.lastIpcObject.pinned ? "yes" : "no")
+ text: qsTr("Pinned: %1").arg(root.client?.lastIpcObject.pinned ? "yes" : "no")
color: Colours.palette.m3secondary
}
Detail {
icon: "fullscreen"
text: {
- const fs = Hyprland.activeToplevel?.lastIpcObject.fullscreen;
+ const fs = root.client?.lastIpcObject.fullscreen;
if (fs)
return qsTr("Fullscreen state: %1").arg(fs == 0 ? "off" : fs == 1 ? "maximised" : "on");
return qsTr("Fullscreen state: unknown");