finished update

This commit is contained in:
2025-11-09 02:37:11 +01:00
parent 4acc1556b2
commit 089a5f7a49
6 changed files with 49 additions and 110 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import Quickshell.Io
Process {
id: getGifsProcess
property list<string> gifsList: []
command: ["sh", "-c", "./Scripts/files.sh"]
command: ["sh", "-c", "$HOME/.config/quickshell/QtDesktopPet/Scripts/files.sh"]
stdout: StdioCollector {
onStreamFinished: {
var gifs = this.text.trim().split("\n")
-14
View File
@@ -1,14 +0,0 @@
import Quickshell.Io
Process {
id: getGifsProcess
property list<string> gifsList: []
command: ["sh", "-c", "/home/inorishio/.config/quickshell/QtDesktopPet/Scripts/gifs.sh"]
stdout: StdioCollector {
onStreamFinished: {
var gifs = this.text.trim().split("\n")
getGifsProcess.gifsList = gifs
}
}
}
-43
View File
@@ -1,43 +0,0 @@
import QtQuick
import Quickshell.Io
import Quickshell.Wayland
Rectangle {
id: root
width: imageEvernight.width
height: imageEvernight.height
required property var path
AnimatedImage {
id: imageEvernight
source: root.path
fillMode: Image.PreserveAspectFit
}
IpcHandler {
target: "command"
// Keybind swap layer
function toggleLayer(): void {
if ( !mainWindow.onTop ) {
mainWindow.WlrLayershell.layer = WlrLayer.Top
mainWindow.onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
mainWindow.onTop = false
}
}
// Keybind swap overlay
function toggleOverlay(): void {
if (!mainWindow.onTop) {
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
mainWindow.onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
mainWindow.onTop = false
}
}
}
}
-10
View File
@@ -1,10 +0,0 @@
import QtQuick
Rectangle {
width: AnimatedImage.width
height: AnimatedImage.height
AnimatedImage {
fillMode: Image.PreserveAspectFit
}
}
-39
View File
@@ -1,39 +0,0 @@
import QtQuick
import Quickshell.Io
import Quickshell.Wayland
Rectangle {
width: 320
height: 293
AnimatedImage {
source: "../Gifs/Evernight.gif"
fillMode: Image.PreserveAspectFit
}
IpcHandler {
target: "command"
// Keybind swap layer
function toggleLayer(): void {
if ( !mainWindow.onTop ) {
mainWindow.WlrLayershell.layer = WlrLayer.Top
mainWindow.onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
mainWindow.onTop = false
}
}
// Keybind swap overlay
function toggleOverlay(): void {
if (!mainWindow.onTop) {
mainWindow.WlrLayershell.layer = WlrLayer.Overlay
mainWindow.onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
mainWindow.onTop = false
}
}
}
}
+48 -3
View File
@@ -1,6 +1,7 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import qs.Modules
@@ -30,7 +31,7 @@ PanelWindow {
id: getGifs
running: true
}
GifsLoader {
id: gifloader
gifsList: getGifs.gifsList
@@ -39,6 +40,32 @@ PanelWindow {
}
}
IpcHandler {
target: "command"
// Keybind swap layer
function toggleLayer(): void {
if ( !mainWindow.onTop ) {
mainWindow.WlrLayershell.layer = WlrLayer.Top
mainWindow.onTop = true
} else {
mainWindow.WlrLayershell.layer = WlrLayer.Bottom
mainWindow.onTop = false
}
}
// Keybind swap overlay
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 )
@@ -49,7 +76,25 @@ PanelWindow {
Region { }
}
mask: Region {
id: pets
mask: Region {}
property var petMove: Region { id: pets }
property var noMove: Region {}
property bool setMask: false
IpcHandler {
target: "Mask"
function edmask(): void {
if ( !mainWindow.setMask ) {
mainWindow.mask = petMove
mainWindow.setMask = true
} else {
mainWindow.mask = noMove
mainWindow.setMask = false
}
}
}
}