picker: use hyprctl proc to get cursor on init
This commit is contained in:
parent
3e0360401b
commit
96f54e7b70
1 changed files with 12 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import qs.services
|
|||
import qs.config
|
||||
import Caelestia
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
|
|
@ -191,6 +192,17 @@ MouseArea {
|
|||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
running: true
|
||||
command: ["hyprctl", "cursorpos", "-j"]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
const pos = JSON.parse(text);
|
||||
root.checkClientRects(pos.x - root.screen.x, pos.y - root.screen.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: screencopy
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue