66 lines
1.8 KiB
QML
Raw Normal View History

2025-12-24 15:41:03 +01:00
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
2025-12-26 00:37:39 +01:00
import "../../"
import "."
2025-12-24 15:41:03 +01:00
WlrLayershell {
id: overlayRoot
required property var modelData
2025-12-31 11:36:18 +01:00
property var padding: 5
property var rounding: 20
onPaddingChanged: {
hyprGaps.exec(hyprGaps.command);
console.log(hyprGaps.command);
}
2025-12-24 15:41:03 +01:00
Process {
id: hyprGaps
running: true
property bool isZero: overlayRoot.padding === 0
property var top: isZero ? 10 : overlayRoot.padding * 2
property var sides: overlayRoot.padding + top
property var gaps: top + "," + sides + "," + sides + "," + sides
command: ["hyprctl", "keyword", "general:gaps_out", gaps]
onStarted: console.log("set gaps to ", gaps)
}
Process {
id: hyprRounding
property var rounding: overlayRoot.rounding - 5
running: true
command: ["hyprctl", "keyword", "decoration:rounding", rounding]
onStarted: console.log("set rounding to ", overlayRoot.rounding)
}
2025-12-24 15:41:03 +01:00
// 1. Fill the entire screen
anchors {
top: true
bottom: true
left: true
right: true
}
// 2. Sit on top of EVERYTHING (even fullscreen apps if compositor allows)
layer: WlrLayer.Top
2025-12-24 15:41:03 +01:00
// 3. Invisible background
color: "transparent"
// 4. 👻 GHOST MODE ENABLED 👻
// An empty Region means "I accept mouse events nowhere".
// This guarantees you can click through the black corners.
mask: Region {}
// 5. Load the corners!
2025-12-31 00:46:09 +01:00
ScreenPadding {
paddingWidth: overlayRoot.padding
paddingColor: Colors.background
}
2025-12-24 15:41:03 +01:00
ScreenCorners {
// Adjust these to match your screen's aesthetic
cornerRadius: overlayRoot.rounding
margin: overlayRoot.padding
2025-12-26 00:37:39 +01:00
cornerColor: Colors.background
2025-12-24 15:41:03 +01:00
}
}