From 096e96c2c39ba92cf6874a0433dbc1dff7a8166d Mon Sep 17 00:00:00 2001 From: chlorospingus Date: Tue, 15 Sep 2026 20:02:17 -0700 Subject: [PATCH] Improvements --- Panes/Brightness.qml | 2 +- Panes/Overview.qml | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Panes/Brightness.qml b/Panes/Brightness.qml index e45ed0e..c1fe9e5 100644 --- a/Panes/Brightness.qml +++ b/Panes/Brightness.qml @@ -105,7 +105,7 @@ Column { onExited: (exitCode) => {if (!exitCode) sunsetToggle.active = true} } TapHandler { - property var idleProc: Process {command: ["hyprsunset"]} + property var idleProc: Process {command: ["hyprsunset", "-t", "3500"]} property var idleKill: Process {command: ["pkill", "-x", "hyprsunset"]} onTapped: { parent.active = !parent.active diff --git a/Panes/Overview.qml b/Panes/Overview.qml index e82cdc1..ab49e59 100644 --- a/Panes/Overview.qml +++ b/Panes/Overview.qml @@ -23,21 +23,24 @@ Grid { component WorkspaceView: ClippingRectangle { id: workspaceView color: "#282828" + height: Hyprland.focusedMonitor?.height * widthRatio width: 192 radius: 8 topLeftRadius: modelData == 0 ? 12 : this.radius topRightRadius: modelData == 4 ? 12 : this.radius bottomLeftRadius: modelData == 5 ? 12 : this.radius property var widthRatio: this.width / Hyprland.focusedMonitor?.width - height: Hyprland.focusedMonitor?.height * widthRatio + property var toplevels: Hyprland.toplevels.values.filter( + tl => tl.workspace?.id == modelData + 1 + ) border { width: 2 color: { - if (Hyprland.focusedWorkspace?.id == modelData + 1) { + if (Hyprland.focusedWorkspace?.id == modelData + 1 || hover.hovered) { return "#ffffffff" } - if (hover.hovered) { - return "#aaffffff" + if (toplevels.length) { + return "#44ffffff" } return "#00ffffff" @@ -52,12 +55,20 @@ Grid { fillMode: Image.PreserveAspectCrop } Repeater { - model: Hyprland.toplevels.values.filter(tl => tl.workspace?.id == modelData + 1) - delegate: Item { + model: Hyprland.toplevels.values + .filter(tl => tl.workspace?.id == modelData + 1) + .sort((a, b) => { + if (a.lastIpcObject.floating) return 1; + if (b.lastIpcObject.floating) return -1; + return 0 + }) + delegate: ClippingRectangle { + id: toplevelView x: modelData.lastIpcObject.at?.[0] * workspaceView.widthRatio - 2 y: modelData.lastIpcObject.at?.[1] * workspaceView.widthRatio - 2 width: modelData.lastIpcObject.size?.[0] * workspaceView.widthRatio height: modelData.lastIpcObject.size?.[1] * workspaceView.widthRatio + radius: modelData.lastIpcObject.floating ? 4 : 0 ScreencopyView { anchors.fill: parent captureSource: modelData.wayland @@ -65,7 +76,7 @@ Grid { layer.enabled: true layer.effect: MultiEffect { blurEnabled: true - blurMax: 8 + blurMax: 4 blur: 1 autoPaddingEnabled: false } @@ -73,7 +84,10 @@ Grid { Image { id: appicon anchors.centerIn: parent - width: 36 + width: 24 + 24 * Math.min( + (parent.width / workspaceView.width), + (parent.height / workspaceView.height) + ) height: width sourceSize.width: width sourceSize.height: height @@ -99,6 +113,12 @@ Grid { blurMax: 12 shadowEnabled: true } + Rectangle { + anchors.fill: parent + color: 'transparent' + border { width: 1; color: "#44ffffff" } + radius: toplevelView.radius + 1 + } } } TapHandler { onTapped: {