FUNCTIONS SU-..

This commit is contained in:
2025-10-15 00:23:11 +02:00
parent e7cebf3092
commit ca365460af
2 changed files with 26 additions and 7 deletions
-3
View File
@@ -2,8 +2,6 @@ import QtQuick
import Quickshell.Wayland
QtObject {
property bool onTop: true
// The main toggle function
function toggleLayer() {
if (!onTop) {
@@ -13,6 +11,5 @@ QtObject {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
onTop = false
}
console.log("Toggled layer, onTop =")
}
}
+26 -4
View File
@@ -19,13 +19,35 @@ PanelWindow {
implicitHeight: 293
margins {
left: 0
bottom: 5
bottom: 9
}
property bool onTop: true
IpcHandler {
id: ipc
target: mainWindow
function getColor() { return mainWindow.color.toString() }
target: "command"
// Keybind swap layer
function toggleLayer(): void {
if (!onTop) {
mainWindow.WlrLayershell.layer = WlrLayer.Top
onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
onTop = false
}
}
// Keybind swap overlay
function toggleOverlay(): void {
if (!onTop) {
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
onTop = false
}
}
}
ToggleLayer {