From 593fc55b532294084b3a7c8d6f57d2f8b638fe8a Mon Sep 17 00:00:00 2001 From: chlorospingus Date: Sun, 5 Jul 2026 06:34:45 -0700 Subject: [PATCH] Add overlay and oneshot crosshair --- Boateye.qml | 114 +++++++++++++++++++++++++++-------------------- Keystrokes.qml | 68 ++++++++++++++++++++++++++++ Overlay.qml | 56 +++++++++++++++++++++++ discord.frag | 22 +++++++++ discord.frag.qsb | Bin 0 -> 1607 bytes shell.qml | 2 + 6 files changed, 214 insertions(+), 48 deletions(-) create mode 100644 Keystrokes.qml create mode 100644 Overlay.qml create mode 100644 discord.frag create mode 100644 discord.frag.qsb 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 -e;s})V0|}IfM9|8L zu9x%Kxz@fjck9#v<+YD}>|fEx{%ch~q^h0Sowe5&Cj_d}hi0Sm-OT=G=C`vm>vI@m zrx;@caP`4;iM?c;S!|QJti@JX0DmDXvnbqYRHbhUi}Is0M%PPfRA!|1kT2EtB>` z*eZ-T3?_L0{K>`>GvZ}4U%-82XGAI`tFtUAmWNl}_Izp2MDj-ghx#P?fTz=Nzd?3N zzDY4rM!Rcmxt~oiSu|h3+=OB*1$Y z^W!3?(&t6;fm|<>{t-x+iyM@`>oMF-n)?}i;eJk%E$V-TSkttQKLC$&Q*cewnx-@k z9}|Ze&3BsgibF=@pyNKFImO`?*`oe;h@;}+{TIl{nAii!b&&8=#MjjLB4!RQlkDd- zzFFdXTjOzu^onmzZ6Ml~P-qZLNMEx+fMD}-SzZaOS zHS~Rt=9Y+$tRuM=g)PRgc>fbB|GqpK2I!1Mq0HLHMdJI(T{n!pz&Gw>v#CbtI-Zbr zyy{NFsMG?RFCI{PJ}6TW51S4*wwsmI>y!bbZu7kHl3P!09(t`sp%WfZxz?~9kMBwC zuIuED?Wz;h7E}A+s_A=`AgrS=!^$ma8W}LM>y4Tl=2nd;XoijpfL%M>^ZY8h%Ax;F zx3v-kVL6L)fmb$g!RZW969F4W(co^2H$ykKnwFksyKFO(-gXew3~Rms_=edsibW)4 z3chAbhvf58@+w9e@EIYj>mwpe>4 zHaiuX%f6?oJE^z-SH1nH)!U0sy%qk$dh`5Vr4}@~bX$R?tpv3oJXZOg6yLiQUpvch zQFpq{AtjffcL^E;UpY_`6*m->@xTb(suyuLOmAn^hK9j+R^9#voQhJ*xAM4Rt6hd* z1(o-0P^m;NPdkdFtV=>tZN{K^9V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