mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 10:30:44 +02:00
ported some quickshell stuff from rivendell-hyprdots
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
pragma Singleton
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import "." as Screenshot
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
property bool isOpen: false
|
||||
|
||||
IpcHandler {
|
||||
target: "screenshot"
|
||||
|
||||
function open() {
|
||||
root.isOpen = true;
|
||||
}
|
||||
|
||||
function close() {
|
||||
root.isOpen = false;
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
root.isOpen = !root.isOpen;
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
active: root.isOpen
|
||||
Screenshot.Overlay {
|
||||
controller: root
|
||||
}
|
||||
}
|
||||
|
||||
// Empty function to define first reference to singleton
|
||||
function init() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user