Linux Guide 📓

Swww

Last updated: 2024, Mon Jun 3rd at 13:54 CDT

Efficient animated wallpaper daemon for wayland that allows you to change the wallpaper at runtime.

GitHub

To Install: #

Preferred method

In most cases its best to compile it

Only available in the AUR

AUR: swww

sudo zypper in swww

Build Instructions #

Info

Dependencies may be different than the names listed based on the distro.

Dependencies #
  • a compositor that implements:
    • wlr-layer-shell (typically wlroots based compositors)
    • xdg-output
  • lz4 (for compressing frames when animating)
  • Up to date stable rustc compiler and cargo (specifically, MSRV is 1.70.0)
Build #

To build:

git clone https://github.com/LGFae/swww
cd swww
cargo build --release

Then, put both binaries target/release/swww and target/release/swww-daemon in your path. Optionally, autocompletion scripts for bash, zsh, Fish and elvish are offered in the completions directory.

Essentials #

Start by initializing the daemon:

swww init

Then, simply pass the image you want to display:

swww img <path/to/img>

# You can also specify outputs:
swww img -o <outputs> <path/to/img>

# Control how smoothly the transition will happen and/or it's frame rate
# For the step, smaller values = more smooth. Default = 20
# For the frame rate, default is 30.
swww img <path/to/img> --transition-step <1 to 255> --transition-fps <1 to 255>

# There are also many different transition effects:
swww img <path/to/img> --transition-type center

# Note you may also control the above by setting up the SWWW_TRANSITION_FPS,
# SWWW_TRANSITION_STEP, and SWWW_TRANSITION environment variables.

# To see all options, run
swww img --help

If you would like to know the valid values for <outputs>, you can query the daemon. This will also tell you what the current image being displayed is, as well as the dimensions detected for the outputs. If you need more detailed information, I would recommend using wlr-randr.

swww query

Finally, to stop the daemon, kill it:

swww kill

For a more complete description, run swww --help or swww <subcommand>--help. Finally, to get a feel for what you can do with some shell scripting, check out the example_scripts folder. It can help you get started.

Extras #

Note

In order to generate the man pages, you must have scdoc installed. Run

If you compiled swww and want man pages, go into the cloned repository cd swww or if you are already in it just run

./doc/gen.sh

The man pages will be in doc/generated. To install them, you must move them to to the appropriate location in your system. You should be able to figure out where that is by running manpath.