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
|
||||
|
||||
property alias gifFolder: adapter.gifFolder
|
||||
property alias ready: root.loaded
|
||||
|
||||
property bool loaded: false
|
||||
property string configDir: Quickshell.env("HOME") + "/.config/QtDesktopPet"
|
||||
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
|
||||
property string configPath: configDir + "/config.json"
|
||||
|
||||
signal folderChanged()
|
||||
@@ -25,11 +22,9 @@ Singleton {
|
||||
onExited: function( exitCode ) {
|
||||
if (exitCode !== 0) {
|
||||
dirCreate.running = true
|
||||
} else {
|
||||
fileCheck.running = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: dirCreate
|
||||
@@ -38,31 +33,9 @@ Singleton {
|
||||
|
||||
onExited: function(): void {
|
||||
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 {
|
||||
id: watcher
|
||||
path: root.configPath
|
||||
@@ -71,12 +44,10 @@ Singleton {
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
onLoaded: root.loaded = true
|
||||
|
||||
JsonAdapter {
|
||||
id: adapter
|
||||
|
||||
property string gifFolder: ""
|
||||
property string gifFolder: Quickshell.shellDir + "/Gifs"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,13 +26,14 @@ Repeater {
|
||||
|
||||
x: 0
|
||||
y: Screen.height - height
|
||||
width: gif.width
|
||||
height: gif.height
|
||||
width: Math.floor( gif.sourceSize.width / 2 )
|
||||
height: Math.floor( gif.sourceSize.height / 2 )
|
||||
|
||||
AnimatedImage {
|
||||
id: gif
|
||||
source: gifItem.modelData
|
||||
fillMode: Image.PreserveAspectFit
|
||||
// fillMode: Image.PreserveAspectFit
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Mouse {}
|
||||
|
||||
@@ -4,12 +4,14 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import qs.Modules
|
||||
|
||||
PanelWindow {
|
||||
id: mainWindow
|
||||
color: "transparent"
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||
surfaceFormat.opaque: false
|
||||
|
||||
property bool onTop: true
|
||||
@@ -32,7 +34,7 @@ PanelWindow {
|
||||
GetGifs {
|
||||
id: getGifs
|
||||
gifFolder: ConfigLoader.gifFolder
|
||||
running: ConfigLoader.ready
|
||||
running: true
|
||||
}
|
||||
|
||||
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 ) {
|
||||
let newregion = regionComponent.createObject( pets, { "item": itemObject })
|
||||
pets.regions.push( newregion )
|
||||
@@ -104,16 +82,35 @@ PanelWindow {
|
||||
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 bool setMask: false
|
||||
|
||||
IpcHandler {
|
||||
target: "Mask"
|
||||
GlobalShortcut {
|
||||
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 ) {
|
||||
mainWindow.mask = mainWindow.petMove
|
||||
mainWindow.setMask = true
|
||||
|
||||
Reference in New Issue
Block a user