Wallpaper: add ipc call to set new random wallpaper

This commit is contained in:
Ly-sec 2025-09-02 14:42:04 +02:00
parent 3e598cf1cd
commit 91b355689c
2 changed files with 13 additions and 0 deletions

View file

@ -1,6 +1,7 @@
import QtQuick
import Quickshell
import Quickshell.Io
import qs.Commons
import qs.Services
Item {
@ -130,4 +131,14 @@ Item {
sidePanel.toggle(Quickshell.screens[0])
}
}
// Wallpaper IPC: trigger a new random wallpaper
IpcHandler {
target: "wallpaper"
function random() {
if (Settings.data.wallpaper.enabled) {
WallpaperService.setRandomWallpaper()
}
}
}
}