Fix rofi rice and gitignore generated files
This commit is contained in:
@@ -7,9 +7,23 @@ Item {
|
||||
// Store all wallpapers
|
||||
property var wallpapers: []
|
||||
|
||||
// path to the current wallpaper
|
||||
property string currentWallpaper: ""
|
||||
|
||||
// process to run the command to change the wallpaper
|
||||
Process {
|
||||
id: wallpaperProcess
|
||||
|
||||
onRunningChanged: {
|
||||
if (!running) {
|
||||
updateCurrentWallpaperProcess.running = true; // update the current wallpaper file after changing it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: updateCurrentWallpaperProcess
|
||||
command: ["bash", "-c", "cp " + wallpaperHolder.currentWallpaper + " ~/.config/hypr/current_wallpaper"]
|
||||
}
|
||||
|
||||
// Load wallpaper list once at startup
|
||||
@@ -35,10 +49,12 @@ Item {
|
||||
var index = Math.floor(Math.random() * wallpapers.length);
|
||||
var path = wallpapers[index];
|
||||
|
||||
wallpaperHolder.currentWallpaper = path;
|
||||
wallpaperProcess.command = ["matugen", "image", path]
|
||||
console.log("Running command: " + wallpaperProcess.command);
|
||||
|
||||
wallpaperProcess.running = true;
|
||||
currentWallpaper = path;
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
||||
Reference in New Issue
Block a user