More pets
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Process {
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import qs.Modules
|
||||
|
||||
Repeater {
|
||||
id: gifRepeater
|
||||
required property list<string> gifsList
|
||||
property int firstWidth
|
||||
property int lastWidth
|
||||
model: gifsList
|
||||
Item {
|
||||
x: gifRepeater.itemAt(index - 1).x + gifRepeater.itemAt(index - 1).width
|
||||
y: Screen.height - height
|
||||
width: gif.width
|
||||
height: gif.height
|
||||
AnimatedImage {
|
||||
@@ -18,4 +21,3 @@ Repeater {
|
||||
Mouse {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user