43 Commits

Author SHA1 Message Date
Inorishio 7d8037a82c Fix / move bug 2025-12-04 19:39:45 +01:00
Inorishio cf55c79855 Zach: I know everything about your life 2025-12-03 23:22:59 +01:00
InoriShio e9fab71e9d Merge pull request #2 from Zacharias-Brohn/Repeater
Zachjittery pog
2025-12-03 15:57:31 +00:00
Zacharias-Brohn 5318d3897b fixes 2025-12-03 15:33:29 +01:00
Inorishio 8967e3a1f5 Claude pog? 2025-12-03 13:53:58 +01:00
Inorishio 089a5f7a49 finished update 2025-11-09 02:37:11 +01:00
Inorishio 4acc1556b2 More pets 2025-11-04 08:02:03 +01:00
Inorishio 9dd1a5430d repeater 2025-10-30 14:39:51 +01:00
Inorishio dbcde131aa MOVEMENT 2025-10-27 00:14:05 +01:00
Inorishio 2f8a3e98a5 REGIONS 2025-10-26 22:28:03 +01:00
Inorishio 03adbbd38f REGIONS 2025-10-23 00:47:29 +02:00
Inorishio bdccb9e0aa read me 2025-10-22 22:32:56 +02:00
Inorishio 010643ee23 Click through it... 2025-10-22 22:06:14 +02:00
Inorishio 7fa9f85856 clean up 2025-10-21 22:48:57 +02:00
Inorishio 1a39b63b20 clean up 2025-10-21 22:29:38 +02:00
Inorishio da07682764 Evernight & Caelestia 2025-10-20 10:53:55 +02:00
Inorishio b20768f64c Git 2025-10-19 23:35:08 +02:00
Inorishio 2663d706b8 Git 2025-10-19 23:34:47 +02:00
Inorishio c57e90d65e Git 2025-10-19 23:34:16 +02:00
Inorishio cbd67c3c34 Git ignore 2025-10-15 22:46:31 +02:00
Inorishio 09d5484f52 Git ignore 2025-10-15 22:44:57 +02:00
Inorishio fc737d6edc Update text 2025-10-15 16:01:50 +02:00
Inorishio 7c67b41a7b Update text 2025-10-15 15:54:16 +02:00
Inorishio 2b16c6a612 Update text 2025-10-15 15:52:36 +02:00
Inorishio c6277a4a2a Update text 2025-10-15 15:21:36 +02:00
Inorishio ab2b3ce0a8 Update text 2025-10-15 15:21:09 +02:00
Inorishio 1d70410331 Update text 2025-10-15 15:20:28 +02:00
Inorishio 49c49e2e90 Update text 2025-10-15 15:17:09 +02:00
Inorishio 5dad7c0769 Update text 2025-10-15 14:45:16 +02:00
Inorishio 319a8ce00f Update text 2025-10-15 14:44:10 +02:00
Inorishio 74692b2b97 Update text 2025-10-15 14:29:47 +02:00
Inorishio 35522f5c3c Update text 2025-10-15 14:09:07 +02:00
Inorishio 5d0272b9bd Read me 2025-10-15 00:52:30 +02:00
Inorishio f2ac47cd88 Read me 2025-10-15 00:52:08 +02:00
Inorishio e7f2e43e52 Read me 2025-10-15 00:51:29 +02:00
Inorishio 0718d25887 Read me 2025-10-15 00:47:27 +02:00
Inorishio 52bc58da18 Read me 2025-10-15 00:43:23 +02:00
Inorishio 6911476077 Read me 2025-10-15 00:41:46 +02:00
Inorishio 270a7c0e4e Read me 2025-10-15 00:39:00 +02:00
Inorishio ae32389764 Read me 2025-10-15 00:27:34 +02:00
Inorishio 89962477c0 Read me 2025-10-15 00:26:21 +02:00
Inorishio ca365460af FUNCTIONS SU-.. 2025-10-15 00:23:11 +02:00
Inorishio e7cebf3092 expansion 2025-10-14 16:05:58 +02:00
9 changed files with 272 additions and 57 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 298 KiB

After

Width:  |  Height:  |  Size: 298 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 647 KiB

+53
View File
@@ -0,0 +1,53 @@
pragma Singleton
import QtCore
import QtQuick
import Quickshell.Io
import Quickshell
Singleton {
id: root
property alias gifFolder: adapter.gifFolder
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
property string configPath: configDir + "/config.json"
signal folderChanged()
Process {
id: dirCheck
running: true
command: ["test", "-d", root.configDir]
onExited: function( exitCode ) {
if (exitCode !== 0) {
dirCreate.running = true
}
}
}
Process {
id: dirCreate
running: false
command: ["mkdir", "-p", root.configDir]
onExited: function(): void {
console.log("Created config directory:", root.configDir)
}
}
FileView {
id: watcher
path: root.configPath
watchChanges: true
onFileChanged: reload()
JsonAdapter {
id: adapter
property string gifFolder: Quickshell.shellDir + "/Gifs"
}
}
}
+32
View File
@@ -0,0 +1,32 @@
import Quickshell.Io
Process {
id: getGifsProcess
required property string gifFolder
property list<string> gifsList: []
command: ["find", gifFolder, "-type", "f", "-name", "*.gif"]
stdout: StdioCollector {
onStreamFinished: {
var gifs = this.text.trim().split("\n")
if (gifs.length > 0 && gifs[0] !== "") {
getGifsProcess.gifsList = gifs
} else {
getGifsProcess.gifsList = []
}
}
}
function reload() {
gifsList = []
running = false
running = true
}
onGifFolderChanged: {
if (running) {
reload()
}
}
}
+41
View File
@@ -0,0 +1,41 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.Modules
Repeater {
id: gifRepeater
required property list<string> gifsList
property int firstWidth
property int lastWidth
model: gifsList
Item {
id: gifItem
required property int index
required property string modelData
function xPos(): void {
let xPos = 0;
const item = gifRepeater.itemAt(index - 1);
if ( item ) xPos += item.x + item.width;
return xPos;
}
Component.onCompleted: x = xPos()
x: 0
y: Screen.height - ( height + 10 )
width: Math.floor( gif.sourceSize.width / 1.25 )
height: Math.floor( gif.sourceSize.height / 1.25 )
AnimatedImage {
id: gif
source: gifItem.modelData
// fillMode: Image.PreserveAspectFit
anchors.fill: parent
}
Mouse {}
}
}
+12
View File
@@ -0,0 +1,12 @@
import QtQuick
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
drag.target: parent
drag.axis: Drag.XAndYAxis
drag.minimumX: 0
drag.maximumX: Screen.width - parent.width
drag.minimumY: 0
drag.maximumY: Screen.height - parent.height
}
+11 -1
View File
@@ -1 +1,11 @@
### Pet March (Evernight)
<div align="Center">
<h3> Pet March (Evernight) </h3>
<p>My selfmade desktop pet using QT </p>
<img src=./Assets/evernight.gif style="margin: 0px 30px 0px 0px;" />
</div>
## Feature to-do list
- [x] Hyprland keybind support (Swap between top/bottom/overlay)
- [x] Be able to click through your pet
- [] Dynamic pets
- [] Multiple pets
Executable → Regular
+103 -36
View File
@@ -1,55 +1,122 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
//import qs.Gifs
import Quickshell.Hyprland
import qs.Modules
PanelWindow {
id: mainWindow
WlrLayershell.layer: WlrLayer.Top
color: "transparent"
anchors {
bottom: true
left: true
}
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.exclusionMode: ExclusionMode.Ignore
surfaceFormat.opaque: false
implicitWidth: 320
implicitHeight: 293
margins {
left: 0
bottom: 5
}
property bool onTop: true
property list<Item> repeaterItems: []
function toggleLayer() {
if (onTop) {
WlrLayershell.layer = WlrLayer.Bottom
onTop = false
anchors {
left: true
bottom: true
right: true
top: true
}
margins {
left: 0
bottom: 9
right: 0
top: 0
}
GetGifs {
id: getGifs
gifFolder: ConfigLoader.gifFolder
running: true
}
GifsLoader {
id: gifLoader
gifsList: getGifs.gifsList
onItemAdded: function( index, item ) {
mainWindow.repeaterItems.push( item )
}
}
Variants {
id: maskVariants
model: [ ...mainWindow.repeaterItems ]
Region {
required property Item modelData
Component.onCompleted: {
console.log(modelData)
}
x: modelData.x
y: modelData.y
width: modelData.width
height: modelData.height
intersection: Intersection.Subtract
}
}
function petRegion( itemObject ) {
let newregion = regionComponent.createObject( pets, { "item": itemObject })
pets.regions.push( newregion )
}
Component {
id: regionComponent
Region { }
}
mask: Region {
width: Screen.width
height: Screen.height
intersection: Intersection.Xor
regions: maskVariants.instances
}
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: true
GlobalShortcut {
appid: "I-DeskPet"
name: "toggle-Layer"
onPressed: {
if (!mainWindow.onTop) {
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
mainWindow.onTop = true
} else {
WlrLayershell.layer = WlrLayer.Top
onTop = true
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
mainWindow.onTop = false
}
}
}
Rectangle {
anchors.fill: parent
color: "transparent"
id: petContainer
AnimatedImage {
anchors.fill: parent
source: "Gifs/evernight.gif"
fillMode: Image.PreserveAspectFit
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.MiddleButton
onClicked: (mouse) => {
if (mouse.button === Qt.MiddleButton) {
mainWindow.toggleLayer()
}
GlobalShortcut {
appid: "I-DeskPet"
name: "toggle-Region"
onPressed: {
if ( !mainWindow.setMask ) {
mainWindow.mask = mainWindow.petMove
mainWindow.setMask = true
} else {
mainWindow.mask = mainWindow.noMove
mainWindow.setMask = false
}
}
}