Sway: [Question] multiple random wallpaper set as desktop background??

Created on 10 Jul 2017  路  6Comments  路  Source: swaywm/sway

~/.config/sway/config
output "*" background /home/onny/pictures/fredwang_norway.jpg fill

i can set only one wallpaper ?? is there any option?

Most helpful comment

Here is a one-liner:

set $wallpapers_path $HOME/Images/wallpapers
output * bg `find $wallpapers_path -type f | shuf -n 1` fill

All 6 comments

I use a script and an output line like this:

output * bg `wallpaper` fill

I use a script and an output line like this:

output * bg `wallpaper` fill

broken link

I am trying to write a small utility that can change the desktop wallpaper, regardless of which windowmanager is running. The plan is to change the wallpaper according to the time of day.

Is there a command that can be used for changing the wallpaper after Sway has started?

For Gnome 3 it is something along the lines of:

gsettings set org.gnome.desktop.background picture-uri file:///$PATH_TO_FILE

What would an equivalent command be for Sway?

Found it!

swaymsg 'output "*" background $HOME/some/image.png fill'

Never mind then. :)

Here is a one-liner:

set $wallpapers_path $HOME/Images/wallpapers
output * bg `find $wallpapers_path -type f | shuf -n 1` fill
Was this page helpful?
0 / 5 - 0 ratings

Related issues

J0nnyMak0 picture J0nnyMak0  路  3Comments

marcoms picture marcoms  路  3Comments

WhyNotHugo picture WhyNotHugo  路  3Comments

emersion picture emersion  路  4Comments

mcmfb picture mcmfb  路  3Comments