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

View file

@ -213,6 +213,7 @@ The following commands apply to the Nix flake installation.
| Toggle Settings Window | `noctalia-shell ipc call settings toggle` | | Toggle Settings Window | `noctalia-shell ipc call settings toggle` |
| Toggle Lock Screen | `noctalia-shell ipc call lockScreen toggle` | | Toggle Lock Screen | `noctalia-shell ipc call lockScreen toggle` |
| Toggle Notification History | `noctalia-shell ipc call notifications toggleHistory` | | Toggle Notification History | `noctalia-shell ipc call notifications toggleHistory` |
| Select new random wallpaper | `noctalia-shell ipc call wallpaper random` |
</details> </details>
@ -240,6 +241,7 @@ The following commands apply to both AUR package and manual installation.
| Toggle Settings Window | `qs -c noctalia-shell ipc call settings toggle` | | Toggle Settings Window | `qs -c noctalia-shell ipc call settings toggle` |
| Toggle Lock Screen | `qs -c noctalia-shell ipc call lockScreen toggle` | | Toggle Lock Screen | `qs -c noctalia-shell ipc call lockScreen toggle` |
| Toggle Notification History | `qs -c noctalia-shell ipc call notifications toggleHistory` | | Toggle Notification History | `qs -c noctalia-shell ipc call notifications toggleHistory` |
| Select new random wallpaper | `qs -c noctalia-shell ipc call wallpaper random` |
</details> </details>