Git
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
Assets/
|
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Feature to-do list
|
## Feature to-do list
|
||||||
- Hyprland keybind support
|
- [] Hyprland keybind support
|
||||||
- ToggleLayer: swap layer between bottom and top
|
- [] ToggleLayer: swap layer between bottom and top
|
||||||
- ToggleOverlay: swap layer between bottom and overlay
|
- [] ToggleOverlay: swap layer between bottom and overlay
|
||||||
- Add multiple pets
|
- Add multiple pets
|
||||||
- Auto pet resize
|
- Auto pet resize
|
||||||
- Add moveability to pets with mouse inputs
|
- Add moveability to pets with mouse inputs
|
||||||
|
|||||||
@@ -11,17 +11,18 @@ PanelWindow {
|
|||||||
WlrLayershell.layer: WlrLayer.Top
|
WlrLayershell.layer: WlrLayer.Top
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
anchors {
|
anchors {
|
||||||
bottom: true
|
|
||||||
left: true
|
left: true
|
||||||
|
bottom: true
|
||||||
}
|
}
|
||||||
surfaceFormat.opaque: false
|
|
||||||
implicitWidth: 320
|
|
||||||
implicitHeight: 293
|
|
||||||
margins {
|
margins {
|
||||||
left: 0
|
left: 0
|
||||||
bottom: 9
|
bottom: 9
|
||||||
}
|
}
|
||||||
|
|
||||||
|
surfaceFormat.opaque: false
|
||||||
|
implicitWidth: 320
|
||||||
|
implicitHeight: 293
|
||||||
|
|
||||||
property bool onTop: true
|
property bool onTop: true
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
@@ -29,23 +30,23 @@ PanelWindow {
|
|||||||
|
|
||||||
// Keybind swap layer
|
// Keybind swap layer
|
||||||
function toggleLayer(): void {
|
function toggleLayer(): void {
|
||||||
if (!onTop) {
|
if ( !mainWindow.onTop ) {
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Top
|
mainWindow.WlrLayershell.layer = WlrLayer.Top
|
||||||
onTop = true
|
mainWindow.onTop = true
|
||||||
} else {
|
} else {
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
||||||
onTop = false
|
mainWindow.onTop = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keybind swap overlay
|
// Keybind swap overlay
|
||||||
function toggleOverlay(): void {
|
function toggleOverlay(): void {
|
||||||
if (!onTop) {
|
if (!mainWindow.onTop) {
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
|
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
|
||||||
onTop = true
|
mainWindow.onTop = true
|
||||||
} else {
|
} else {
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
||||||
onTop = false
|
mainWindow.onTop = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,4 +58,6 @@ PanelWindow {
|
|||||||
PetMarch{
|
PetMarch{
|
||||||
id:petMarch
|
id:petMarch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Areapicker{}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user