This commit is contained in:
2025-10-19 23:34:16 +02:00
parent cbd67c3c34
commit c57e90d65e
4 changed files with 99 additions and 14 deletions
-1
View File
@@ -1 +0,0 @@
Assets/
+83
View File
@@ -0,0 +1,83 @@
pragma ComponentBehavior: Bound
import qs.components.containers
import qs.components.misc
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
Scope {
LazyLoader {
id: root
property bool freeze
property bool closing
Variants {
model: Quickshell.screens
StyledWindow {
id: win
required property ShellScreen modelData
screen: modelData
name: "area-picker"
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: root.closing ? WlrKeyboardFocus.None : WlrKeyboardFocus.Exclusive
mask: root.closing ? empty : null
anchors.top: true
anchors.bottom: true
anchors.left: true
anchors.right: true
Region {
id: empty
}
Picker {
loader: root
screen: win.modelData
}
}
}
}
IpcHandler {
target: "picker"
function open(): void {
root.freeze = false;
root.closing = false;
root.activeAsync = true;
}
function openFreeze(): void {
root.freeze = true;
root.closing = false;
root.activeAsync = true;
}
}
CustomShortcut {
name: "screenshot"
description: "Open screenshot tool"
onPressed: {
root.freeze = false;
root.closing = false;
root.activeAsync = true;
}
}
CustomShortcut {
name: "screenshotFreeze"
description: "Open screenshot tool (freeze mode)"
onPressed: {
root.freeze = true;
root.closing = false;
root.activeAsync = true;
}
}
}
+3 -3
View File
@@ -5,9 +5,9 @@
</div>
## Feature to-do list
- Hyprland keybind support
- ToggleLayer: swap layer between bottom and top
- ToggleOverlay: swap layer between bottom and overlay
- [] Hyprland keybind support
- [] ToggleLayer: swap layer between bottom and top
- [] ToggleOverlay: swap layer between bottom and overlay
- Add multiple pets
- Auto pet resize
- Add moveability to pets with mouse inputs
+13 -10
View File
@@ -11,17 +11,18 @@ PanelWindow {
WlrLayershell.layer: WlrLayer.Top
color: "transparent"
anchors {
bottom: true
left: true
bottom: true
}
surfaceFormat.opaque: false
implicitWidth: 320
implicitHeight: 293
margins {
left: 0
bottom: 9
}
surfaceFormat.opaque: false
implicitWidth: 320
implicitHeight: 293
property bool onTop: true
IpcHandler {
@@ -29,23 +30,23 @@ PanelWindow {
// Keybind swap layer
function toggleLayer(): void {
if (!onTop) {
if ( !mainWindow.onTop ) {
mainWindow.WlrLayershell.layer = WlrLayer.Top
onTop = true
mainWindow.onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
onTop = false
mainWindow.onTop = false
}
}
// Keybind swap overlay
function toggleOverlay(): void {
if (!onTop) {
if (!mainWindow.onTop) {
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
onTop = true
mainWindow.onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
onTop = false
mainWindow.onTop = false
}
}
}
@@ -57,4 +58,6 @@ PanelWindow {
PetMarch{
id:petMarch
}
Areapicker{}
}