From 91b355689ca08373352a87f8eec21b698b393891 Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Tue, 2 Sep 2025 14:42:04 +0200 Subject: [PATCH] Wallpaper: add ipc call to set new random wallpaper --- Modules/IPC/IPCManager.qml | 11 +++++++++++ README.md | 2 ++ 2 files changed, 13 insertions(+) diff --git a/Modules/IPC/IPCManager.qml b/Modules/IPC/IPCManager.qml index 771aea4..ba7efca 100644 --- a/Modules/IPC/IPCManager.qml +++ b/Modules/IPC/IPCManager.qml @@ -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() + } + } + } } diff --git a/README.md b/README.md index 97af4e9..ed7160a 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,7 @@ The following commands apply to the Nix flake installation. | Toggle Settings Window | `noctalia-shell ipc call settings toggle` | | Toggle Lock Screen | `noctalia-shell ipc call lockScreen toggle` | | Toggle Notification History | `noctalia-shell ipc call notifications toggleHistory` | +| Select new random wallpaper | `noctalia-shell ipc call wallpaper random` | @@ -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 Lock Screen | `qs -c noctalia-shell ipc call lockScreen toggle` | | Toggle Notification History | `qs -c noctalia-shell ipc call notifications toggleHistory` | +| Select new random wallpaper | `qs -c noctalia-shell ipc call wallpaper random` |