edits
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 344 KiB |
|
Before Width: | Height: | Size: 298 KiB After Width: | Height: | Size: 298 KiB |
@@ -9,6 +9,9 @@ Singleton {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias gifFolder: adapter.gifFolder
|
property alias gifFolder: adapter.gifFolder
|
||||||
|
property alias scaling: adapter.scaling
|
||||||
|
property alias maxWidth: adapter.maxWidth
|
||||||
|
property alias maxHeight: adapter.maxHeight
|
||||||
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
|
property string configDir: Quickshell.env("HOME") + "/.config/I-DeskPet"
|
||||||
property string configPath: configDir + "/config.json"
|
property string configPath: configDir + "/config.json"
|
||||||
|
|
||||||
@@ -48,6 +51,9 @@ Singleton {
|
|||||||
id: adapter
|
id: adapter
|
||||||
|
|
||||||
property string gifFolder: Quickshell.shellDir + "/Gifs"
|
property string gifFolder: Quickshell.shellDir + "/Gifs"
|
||||||
|
property var scaling: 1
|
||||||
|
property int maxWidth: 200
|
||||||
|
property int maxHeight: 200
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-21
@@ -1,32 +1,32 @@
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: getGifsProcess
|
id: getGifsProcess
|
||||||
required property string gifFolder
|
required property string gifFolder
|
||||||
property list<string> gifsList: []
|
property list<string> gifsList: []
|
||||||
|
|
||||||
command: ["find", gifFolder, "-type", "f", "-name", "*.gif"]
|
command: ["find", gifFolder, "-type", "f", "-name", "*.gif"]
|
||||||
|
|
||||||
stdout: StdioCollector {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: {
|
onStreamFinished: {
|
||||||
var gifs = this.text.trim().split("\n")
|
var gifs = this.text.trim().split("\n")
|
||||||
if (gifs.length > 0 && gifs[0] !== "") {
|
if (gifs.length > 0 && gifs[0] !== "") {
|
||||||
getGifsProcess.gifsList = gifs
|
getGifsProcess.gifsList = gifs
|
||||||
} else {
|
} else {
|
||||||
getGifsProcess.gifsList = []
|
getGifsProcess.gifsList = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
gifsList = []
|
gifsList = []
|
||||||
running = false
|
running = false
|
||||||
running = true
|
running = true
|
||||||
}
|
}
|
||||||
|
|
||||||
onGifFolderChanged: {
|
onGifFolderChanged: {
|
||||||
if (running) {
|
if (running) {
|
||||||
reload()
|
getGifsProcess.reload()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell.Io
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: gifRepeater
|
id: gifRepeater
|
||||||
required property list<string> gifsList
|
required property list<string> gifsList
|
||||||
property int firstWidth
|
|
||||||
property int lastWidth
|
|
||||||
model: gifsList
|
model: gifsList
|
||||||
Item {
|
Item {
|
||||||
id: gifItem
|
id: gifItem
|
||||||
@@ -26,8 +26,8 @@ Repeater {
|
|||||||
|
|
||||||
x: 0
|
x: 0
|
||||||
y: Screen.height - height
|
y: Screen.height - height
|
||||||
width: Math.floor( gif.sourceSize.width / 1.25 )
|
width: Math.min( Math.floor( gif.sourceSize.width / ConfigLoader.scaling ), Math.floor( ConfigLoader.maxWidth / ConfigLoader.scaling ))
|
||||||
height: Math.floor( gif.sourceSize.height / 1.25 )
|
height: Math.min( Math.floor( gif.sourceSize.height / ConfigLoader.scaling ), Math.floor( ConfigLoader.maxHeight / ConfigLoader.scaling ))
|
||||||
|
|
||||||
AnimatedImage {
|
AnimatedImage {
|
||||||
id: gif
|
id: gif
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
thingy macbobber: wayland quickshell sessionlock
|
||||||
|
Timer {
|
||||||
|
property bool hasReloaded
|
||||||
|
interval: 5000
|
||||||
|
repeat: true
|
||||||
|
|
||||||
|
onTriggered: {
|
||||||
|
if ( screenUnlocked && !hasReloaded ) {
|
||||||
|
hasReloaded = true;
|
||||||
|
petslocation = null;
|
||||||
|
petslocation = wherever;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,10 +9,11 @@ import qs.Modules
|
|||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: mainWindow
|
id: mainWindow
|
||||||
color: "transparent"
|
WlrLayershell.namespace: "IDeskPet-Pet"
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||||
surfaceFormat.opaque: false
|
surfaceFormat.opaque: false
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
property bool onTop: true
|
property bool onTop: true
|
||||||
property list<Item> repeaterItems: []
|
property list<Item> repeaterItems: []
|
||||||
|
|||||||
Reference in New Issue
Block a user