Zach: I know everything about your life
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"permissions": {
|
|
||||||
"allow": [
|
|
||||||
"Bash(dir:*)",
|
|
||||||
"Bash(cat:*)",
|
|
||||||
"Bash(git ls-tree:*)",
|
|
||||||
"Bash(cd:*)"
|
|
||||||
],
|
|
||||||
"deny": [],
|
|
||||||
"ask": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
.claude/
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 647 KiB |
@@ -9,10 +9,7 @@ Singleton {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias gifFolder: adapter.gifFolder
|
property alias gifFolder: adapter.gifFolder
|
||||||
property alias ready: root.loaded
|
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
|
||||||
|
|
||||||
property bool loaded: false
|
|
||||||
property string configDir: Quickshell.env("HOME") + "/.config/QtDesktopPet"
|
|
||||||
property string configPath: configDir + "/config.json"
|
property string configPath: configDir + "/config.json"
|
||||||
|
|
||||||
signal folderChanged()
|
signal folderChanged()
|
||||||
@@ -25,11 +22,9 @@ Singleton {
|
|||||||
onExited: function( exitCode ) {
|
onExited: function( exitCode ) {
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
dirCreate.running = true
|
dirCreate.running = true
|
||||||
} else {
|
|
||||||
fileCheck.running = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: dirCreate
|
id: dirCreate
|
||||||
@@ -38,31 +33,9 @@ Singleton {
|
|||||||
|
|
||||||
onExited: function(): void {
|
onExited: function(): void {
|
||||||
console.log("Created config directory:", root.configDir)
|
console.log("Created config directory:", root.configDir)
|
||||||
fileCreate.running = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
|
||||||
id: fileCheck
|
|
||||||
running: false
|
|
||||||
command: ["test", "-f", root.configPath]
|
|
||||||
|
|
||||||
onExited: function( exitCode ): void {
|
|
||||||
if (exitCode !== 0) {
|
|
||||||
fileCreate.running = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Process {
|
|
||||||
id: fileCreate
|
|
||||||
|
|
||||||
property string homeDir: Quickshell.env("HOME")
|
|
||||||
|
|
||||||
running: false
|
|
||||||
command: ["sh", "-c", `echo '{\"gifFolder\": \"${homeDir}/.config/quickshell/QtDesktopPet/Gifs\"}' > ` + root.configPath]
|
|
||||||
}
|
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
id: watcher
|
id: watcher
|
||||||
path: root.configPath
|
path: root.configPath
|
||||||
@@ -71,12 +44,10 @@ Singleton {
|
|||||||
|
|
||||||
onFileChanged: reload()
|
onFileChanged: reload()
|
||||||
|
|
||||||
onLoaded: root.loaded = true
|
|
||||||
|
|
||||||
JsonAdapter {
|
JsonAdapter {
|
||||||
id: adapter
|
id: adapter
|
||||||
|
|
||||||
property string gifFolder: ""
|
property string gifFolder: Quickshell.shellDir + "/Gifs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,13 +26,14 @@ Repeater {
|
|||||||
|
|
||||||
x: 0
|
x: 0
|
||||||
y: Screen.height - height
|
y: Screen.height - height
|
||||||
width: gif.width
|
width: Math.floor( gif.sourceSize.width / 2 )
|
||||||
height: gif.height
|
height: Math.floor( gif.sourceSize.height / 2 )
|
||||||
|
|
||||||
AnimatedImage {
|
AnimatedImage {
|
||||||
id: gif
|
id: gif
|
||||||
source: gifItem.modelData
|
source: gifItem.modelData
|
||||||
fillMode: Image.PreserveAspectFit
|
// fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
Mouse {}
|
Mouse {}
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import QtQuick
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
|
import Quickshell.Hyprland
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: mainWindow
|
id: mainWindow
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
WlrLayershell.layer: WlrLayer.Top
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
|
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||||
surfaceFormat.opaque: false
|
surfaceFormat.opaque: false
|
||||||
|
|
||||||
property bool onTop: true
|
property bool onTop: true
|
||||||
@@ -32,7 +34,7 @@ PanelWindow {
|
|||||||
GetGifs {
|
GetGifs {
|
||||||
id: getGifs
|
id: getGifs
|
||||||
gifFolder: ConfigLoader.gifFolder
|
gifFolder: ConfigLoader.gifFolder
|
||||||
running: ConfigLoader.ready
|
running: true
|
||||||
}
|
}
|
||||||
|
|
||||||
GifsLoader {
|
GifsLoader {
|
||||||
@@ -63,30 +65,6 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IpcHandler {
|
|
||||||
target: "command"
|
|
||||||
|
|
||||||
function toggleLayer(): void {
|
|
||||||
if ( !mainWindow.onTop ) {
|
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Top
|
|
||||||
mainWindow.onTop = true
|
|
||||||
} else {
|
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
|
||||||
mainWindow.onTop = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleOverlay(): void {
|
|
||||||
if (!mainWindow.onTop) {
|
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
|
|
||||||
mainWindow.onTop = true
|
|
||||||
} else {
|
|
||||||
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
|
||||||
mainWindow.onTop = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function petRegion( itemObject ) {
|
function petRegion( itemObject ) {
|
||||||
let newregion = regionComponent.createObject( pets, { "item": itemObject })
|
let newregion = regionComponent.createObject( pets, { "item": itemObject })
|
||||||
pets.regions.push( newregion )
|
pets.regions.push( newregion )
|
||||||
@@ -104,16 +82,35 @@ PanelWindow {
|
|||||||
regions: maskVariants.instances
|
regions: maskVariants.instances
|
||||||
}
|
}
|
||||||
|
|
||||||
property var petMove: Region { id: pets }
|
property var petMove: Region { id: pets
|
||||||
|
width: Screen.width
|
||||||
|
height: Screen.height
|
||||||
|
intersection: Intersection.Xor
|
||||||
|
regions: maskVariants.instances
|
||||||
|
}
|
||||||
|
|
||||||
property var noMove: Region {}
|
property var noMove: Region {}
|
||||||
|
|
||||||
property bool setMask: false
|
property bool setMask: false
|
||||||
|
|
||||||
IpcHandler {
|
GlobalShortcut {
|
||||||
target: "Mask"
|
appid: "I-DeskPet"
|
||||||
|
name: "toggle-Layer"
|
||||||
|
onPressed: {
|
||||||
|
if (!mainWindow.onTop) {
|
||||||
|
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
|
||||||
|
mainWindow.onTop = true
|
||||||
|
} else {
|
||||||
|
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
|
||||||
|
mainWindow.onTop = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function edmask(): void {
|
GlobalShortcut {
|
||||||
|
appid: "I-DeskPet"
|
||||||
|
name: "toggle-Region"
|
||||||
|
onPressed: {
|
||||||
if ( !mainWindow.setMask ) {
|
if ( !mainWindow.setMask ) {
|
||||||
mainWindow.mask = mainWindow.petMove
|
mainWindow.mask = mainWindow.petMove
|
||||||
mainWindow.setMask = true
|
mainWindow.setMask = true
|
||||||
|
|||||||
Reference in New Issue
Block a user