97 lines
1.8 KiB
QML
97 lines
1.8 KiB
QML
pragma ComponentBehavior: Bound
|
|
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
import Quickshell.Wayland
|
|
import qs.Modules
|
|
|
|
PanelWindow {
|
|
id: mainWindow
|
|
color: "transparent"
|
|
property bool onTop: true
|
|
property bool setMask: true
|
|
WlrLayershell.layer: WlrLayer.Top
|
|
anchors {
|
|
left: true
|
|
bottom: true
|
|
}
|
|
|
|
margins {
|
|
left: 0
|
|
right: 0
|
|
top: 0
|
|
bottom: 9
|
|
}
|
|
|
|
mask: Region {
|
|
Region {
|
|
item: dragEvernight
|
|
}
|
|
|
|
Region {
|
|
item: dragAcheron
|
|
}
|
|
}
|
|
|
|
property var yesMask: Region {
|
|
Region {
|
|
item: dragEvernight
|
|
}
|
|
|
|
Region {
|
|
item: dragAcheron
|
|
}
|
|
}
|
|
|
|
property var noMask: Region {
|
|
}
|
|
|
|
IpcHandler {
|
|
target: "Mask"
|
|
|
|
function edmask(): void {
|
|
if ( !mainWindow.setMask ) {
|
|
mainWindow.mask = yesMask
|
|
mainWindow.setMask = true
|
|
} else {
|
|
mainWindow.mask = noMask
|
|
mainWindow.setMask = false
|
|
}
|
|
}
|
|
}
|
|
|
|
surfaceFormat.opaque: false
|
|
implicitWidth: Screen.width
|
|
implicitHeight: Screen.height
|
|
|
|
Item {
|
|
id: dragEvernight
|
|
x: 0
|
|
y: 1147
|
|
width: evernight.width
|
|
height: evernight.height
|
|
PetMarch {
|
|
id: evernight
|
|
color: mainWindow.color
|
|
}
|
|
|
|
Mouse {
|
|
}
|
|
}
|
|
|
|
Item {
|
|
id: dragAcheron
|
|
x: 2300
|
|
y: 1230
|
|
width: acheron.width
|
|
height: acheron.height
|
|
PetAcheron {
|
|
id: acheron
|
|
color: mainWindow.color
|
|
}
|
|
|
|
Mouse {
|
|
}
|
|
}
|
|
}
|