Random wallpaper with swaybg
Setting a wallpaper in Sway, with swaybg, is easy. Unfortunately there is no way of setting a random wallpaper automatically out of the box. Here is a little helper script to do that.
The script is based on a post from Silvain Durand1 with some slight modifications. I just linked the script my sway config instead of setting a background there.
Sway config: ~/.config/sway/config
|
|
The script spawns a new swaybg
instance, changes the wallpaper, and kills the old instance. With this approach there
is no flickering of the background when changing.
|
|
An always up-to-date version can be found in my dotfiles.
Original script from Silvain Durand: https://sylvaindurand.org/dynamic-wallpapers-with-sway/ ↩︎
This post was created on
.