Improvements

This commit is contained in:
2026-09-15 20:02:17 -07:00
parent a7c34fe2f6
commit 096e96c2c3
2 changed files with 29 additions and 9 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ Column {
onExited: (exitCode) => {if (!exitCode) sunsetToggle.active = true} onExited: (exitCode) => {if (!exitCode) sunsetToggle.active = true}
} }
TapHandler { TapHandler {
property var idleProc: Process {command: ["hyprsunset"]} property var idleProc: Process {command: ["hyprsunset", "-t", "3500"]}
property var idleKill: Process {command: ["pkill", "-x", "hyprsunset"]} property var idleKill: Process {command: ["pkill", "-x", "hyprsunset"]}
onTapped: { onTapped: {
parent.active = !parent.active parent.active = !parent.active
+28 -8
View File
@@ -23,21 +23,24 @@ Grid {
component WorkspaceView: ClippingRectangle { component WorkspaceView: ClippingRectangle {
id: workspaceView id: workspaceView
color: "#282828" color: "#282828"
height: Hyprland.focusedMonitor?.height * widthRatio
width: 192 width: 192
radius: 8 radius: 8
topLeftRadius: modelData == 0 ? 12 : this.radius topLeftRadius: modelData == 0 ? 12 : this.radius
topRightRadius: modelData == 4 ? 12 : this.radius topRightRadius: modelData == 4 ? 12 : this.radius
bottomLeftRadius: modelData == 5 ? 12 : this.radius bottomLeftRadius: modelData == 5 ? 12 : this.radius
property var widthRatio: this.width / Hyprland.focusedMonitor?.width 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 { border {
width: 2 width: 2
color: { color: {
if (Hyprland.focusedWorkspace?.id == modelData + 1) { if (Hyprland.focusedWorkspace?.id == modelData + 1 || hover.hovered) {
return "#ffffffff" return "#ffffffff"
} }
if (hover.hovered) { if (toplevels.length) {
return "#aaffffff" return "#44ffffff"
} }
return "#00ffffff" return "#00ffffff"
@@ -52,12 +55,20 @@ Grid {
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
} }
Repeater { Repeater {
model: Hyprland.toplevels.values.filter(tl => tl.workspace?.id == modelData + 1) model: Hyprland.toplevels.values
delegate: Item { .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 x: modelData.lastIpcObject.at?.[0] * workspaceView.widthRatio - 2
y: modelData.lastIpcObject.at?.[1] * workspaceView.widthRatio - 2 y: modelData.lastIpcObject.at?.[1] * workspaceView.widthRatio - 2
width: modelData.lastIpcObject.size?.[0] * workspaceView.widthRatio width: modelData.lastIpcObject.size?.[0] * workspaceView.widthRatio
height: modelData.lastIpcObject.size?.[1] * workspaceView.widthRatio height: modelData.lastIpcObject.size?.[1] * workspaceView.widthRatio
radius: modelData.lastIpcObject.floating ? 4 : 0
ScreencopyView { ScreencopyView {
anchors.fill: parent anchors.fill: parent
captureSource: modelData.wayland captureSource: modelData.wayland
@@ -65,7 +76,7 @@ Grid {
layer.enabled: true layer.enabled: true
layer.effect: MultiEffect { layer.effect: MultiEffect {
blurEnabled: true blurEnabled: true
blurMax: 8 blurMax: 4
blur: 1 blur: 1
autoPaddingEnabled: false autoPaddingEnabled: false
} }
@@ -73,7 +84,10 @@ Grid {
Image { Image {
id: appicon id: appicon
anchors.centerIn: parent anchors.centerIn: parent
width: 36 width: 24 + 24 * Math.min(
(parent.width / workspaceView.width),
(parent.height / workspaceView.height)
)
height: width height: width
sourceSize.width: width sourceSize.width: width
sourceSize.height: height sourceSize.height: height
@@ -99,6 +113,12 @@ Grid {
blurMax: 12 blurMax: 12
shadowEnabled: true shadowEnabled: true
} }
Rectangle {
anchors.fill: parent
color: 'transparent'
border { width: 1; color: "#44ffffff" }
radius: toplevelView.radius + 1
}
} }
} }
TapHandler { onTapped: { TapHandler { onTapped: {