mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Wallpaper: added IPC to set a wallpaper
qs -c noctalia-shell ipc call wallpaper set $path $monitor $monitor can be a monitor name or "all" or "" to assign to all monitors.
This commit is contained in:
@@ -220,7 +220,7 @@ Singleton {
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
function changeWallpaper(screenName, path) {
|
||||
function changeWallpaper(path, screenName) {
|
||||
if (screenName !== undefined) {
|
||||
_setWallpaper(screenName, path)
|
||||
} else {
|
||||
@@ -305,7 +305,7 @@ Singleton {
|
||||
if (wallpaperList.length > 0) {
|
||||
var randomIndex = Math.floor(Math.random() * wallpaperList.length)
|
||||
var randomPath = wallpaperList[randomIndex]
|
||||
changeWallpaper(screenName, randomPath)
|
||||
changeWallpaper(randomPath, screenName)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -315,7 +315,7 @@ Singleton {
|
||||
if (wallpaperList.length > 0) {
|
||||
var randomIndex = Math.floor(Math.random() * wallpaperList.length)
|
||||
var randomPath = wallpaperList[randomIndex]
|
||||
changeWallpaper(undefined, randomPath)
|
||||
changeWallpaper(randomPath, undefined)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user