Improvements
This commit is contained in:
@@ -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
|
||||
|
||||
+28
-8
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user