diff --git a/Boateye.qml b/Boateye.qml index b9eece7..8f99579 100644 --- a/Boateye.qml +++ b/Boateye.qml @@ -6,65 +6,83 @@ import Quickshell.Io import QtQuick import QtQuick.Effects -PanelWindow { +Item { id: root - visible: false - anchors { - left: true - bottom: true - } - WlrLayershell.namespace: "mcsr" - implicitHeight: 540 - implicitWidth: 540 - color: "transparent" - + property bool open: false IpcHandler { target: "boateye" - function open() {root.visible = true} - function close() {root.visible = false} + function open() {root.open = true} + function close() {root.open = false} } - RectangularShadow { - anchors.fill: wrapper - radius: wrapper.radius - blur: 10 - spread: 2 - } - ClippingRectangle { - color: "#181818" + PanelWindow { + visible: root.open anchors { - left: parent.left - bottom: parent.bottom - margins: 12 + left: true + bottom: true } - width: 500 - height: 500 - id: wrapper - radius: 12 - Item { - anchors.fill: parent - layer.enabled: true - layer.smooth: false - ScreencopyView { - width: Quickshell.screens[0].width - height: Quickshell.screens[0].height - live: true - captureSource: Quickshell.screens[0] - x: -1292 - y: -450 + WlrLayershell.namespace: "mcsr" + implicitHeight: 540 + implicitWidth: 540 + color: "transparent" + + RectangularShadow { + anchors.fill: wrapper + radius: wrapper.radius + blur: 10 + spread: 2 + } + ClippingRectangle { + color: "#181818" + anchors { + left: parent.left + bottom: parent.bottom + margins: 12 } - transform: Scale { - origin { - x: width/2 - y: height/2 + width: 500 + height: 500 + id: wrapper + radius: 12 + Item { + anchors.fill: parent + layer.enabled: true + layer.smooth: false + ScreencopyView { + width: Quickshell.screens[0].width + height: Quickshell.screens[0].height + live: true + captureSource: Quickshell.screens[0] + x: -1544 + y: -693 } - xScale: 15 - yScale: 10 + transform: Scale { + origin { + x: width/2 + y: height/2 + } + // xScale: 15 + // yScale: 10 + xScale: 15 + yScale: 10 + } + } + Image { + anchors.fill: parent + source: "/home/spingus/Pictures/boateye.png" } } - Image { - anchors.fill: parent - source: "/home/spingus/Pictures/boateye.png" + } + PanelWindow { + visible: root.open + anchors { + right: true } + WlrLayershell.layer: WlrLayer.Overlay + exclusionMode: ExclusionMode.Ignore + margins { + right: 998 + } + implicitWidth: 8 + implicitHeight: 8 } } diff --git a/Keystrokes.qml b/Keystrokes.qml new file mode 100644 index 0000000..44a44c5 --- /dev/null +++ b/Keystrokes.qml @@ -0,0 +1,68 @@ +import Quickshell +import Quickshell.Hyprland +import Quickshell.Wayland +import QtQuick + +Item { + id: keystrokes + + PanelWindow { + anchors { + bottom: true + left: true + } + margins { + left: 8 + bottom: 8 + } + implicitWidth: 208 + implicitHeight: 60 + color: "transparent" + WlrLayershell.layer: WlrLayer.Overlay + + Rectangle { + anchors { + bottom: parent.bottom + left: parent.left + } + height: 50 + width: 100 + color: apr.pressed ? "white" : "black" + radius: 12 + Text { + anchors.centerIn: parent + color: apr.pressed ? "black" : "white" + text: "A" + font.pixelSize: 40 + } + } + Rectangle { + anchors { + bottom: parent.bottom + right: parent.right + } + height: 50 + width: 100 + color: spr.pressed ? "white" : "black" + radius: 12 + Text { + anchors.centerIn: parent + color: spr.pressed ? "black" : "white" + text: "S" + font.pixelSize: 40 + } + } + + } + + GlobalShortcut { + id: apr + name: "apressed" + appid: "chlorostroke" + } + GlobalShortcut { + id: spr + name: "spressed" + appid: "chlorostroke" + } +} diff --git a/Overlay.qml b/Overlay.qml new file mode 100644 index 0000000..1bf1d2d --- /dev/null +++ b/Overlay.qml @@ -0,0 +1,56 @@ +import QtQuick +import Quickshell +import Quickshell.Hyprland +import Quickshell.Io +import QtQuick.Effects +import Quickshell.Widgets +import Quickshell.Wayland + +FloatingWindow { + id: overlay + visible: toplevel + color: "transparent" + property var toplevel: null + title: "monoverlay" + + Process { + id: slurp + command: ['sh', '-c', "slurp -f %x,%y,%w,%h