9
139
Fork
You've already forked awww
7
An Answer to your Wayland Wallpaper Woes
  • Rust 97.7%
  • Shell 1.4%
  • Nix 0.9%
LGFae 138c4ebdbe
Some checks failed
ci/woodpecker/cron/update-flake-lock Pipeline failed
ci/woodpecker/cron/update-dependencies Pipeline was successful
Merge PR 'update readme to reflect actual maximum value for transition-fps' ( #522 ) from nyxmeowmeow/awww:main
Reviewed-on: #522 
2025年12月23日 20:28:34 +01:00
.config CI: initial github actions 2024年02月13日 21:05:02 +00:00
.forgejo add some missing name changes 2025年11月07日 14:24:08 +01:00
.woodpecker woodpecker: run dependencies on a rust image because of cargo 2025年11月11日 14:28:44 -03:00
client Put jxl support behind a feature flag 2025年12月17日 21:58:00 +01:00
common update rustix version 2025年12月23日 14:13:29 -03:00
daemon update to waybackend 0.10.0 2025年12月07日 19:51:17 -03:00
doc make doc/gen.sh script more portable 2025年11月07日 14:47:54 -03:00
example_scripts rename project -> An Answer to your Wayland Wallpaper Woes 2025年10月31日 16:25:10 -03:00
protocols rewrite using waybackend 2025年04月05日 19:06:16 -03:00
tests rename project -> An Answer to your Wayland Wallpaper Woes 2025年10月31日 16:25:10 -03:00
.gitignore update .gitignore test_images path 2025年04月05日 19:19:47 -03:00
.typos.toml fix a bunch of typos 2025年09月20日 23:11:32 -03:00
Cargo.lock update rustix version 2025年12月23日 14:13:29 -03:00
Cargo.toml write the resize cli argument in the cache 2025年10月02日 15:15:08 -03:00
CHANGELOG.md rename project -> An Answer to your Wayland Wallpaper Woes 2025年10月31日 16:25:10 -03:00
default.nix Nix: allow building swww from the source directly 2024年05月13日 16:14:59 +05:30
deny.toml update deny.toml 2025年08月16日 11:35:45 -03:00
flake.lock update flake.lock 2025年11月25日 20:32:01 -03:00
flake.nix start transfering over CI to woodpecker 2025年11月01日 12:18:20 -03:00
LICENSE Initial commit 2021年12月30日 22:21:50 -03:00
README.md update readme to reflect actual maximum value for transition-fps 2025年12月24日 03:54:10 +10:00
TODO update TODO 2025年10月31日 16:25:49 -03:00
version.sh rename project -> An Answer to your Wayland Wallpaper Woes 2025年10月31日 16:25:10 -03:00

An Answer to your Wayland Wallpaper Woes

Efficient animated wallpaper daemon for wayland, controlled at runtime

animated gif demonstration

image transition demonstration

Dependencies

  • a compositor that implements the wlr-layer-shell (typically wlroots based compositors)
  • lz4 (for compressing frames when animating)

Note that this means awww will not run on Gnome, because it does not implement the wlr-layer-shell protocol.

Build

Packaging status

Dependencies:

  • wayland-client and wayland-protocol .xml files installed in your system (pkg-config must be able to find it)
  • Up to date stable rustc compiler and cargo (specifically, MSRV is 1.87.0)

To build, clone this repository and run:

cargo build --release

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

Man pages:

In order to generate the man pages, you must have scdoc installed. 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.

Nix

NixOS users can directly use this repository to get the latest awww for their system.

Add in your flake.nix:

 inputs.awww.url = "git+https://codeberg.org/LGFae/awww";

Pass inputs to your modules using specialArgs and Then in configuration.nix:

 environment.systemPackages = [
 inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww
 ];

Features

  • Display animated gifs on your desktop
  • Display any image in the formats:
    • avif (note: must have dav1d dependency and compile with --features=avif flag)
    • jpeg
    • jpegxl (only static jxls are supported)
    • png
    • gif
    • pnm
    • tga
    • tiff
    • webp
    • bmp
    • farbfeld
    • svg (only static svgs are supported)
  • Clear the screen with an arbitrary rrggbb color
  • Smooth transition effect when you switch images
  • Do all of that without having to shutdown and reinitialize the daemon

Why

There are two main reasons that compelled me to make this: the first is that oguri is unmaintained and archived, despite there being serious problems with excess of memory use while displaying certain gifs (see this, for example). The best alternative I've found for oguri was mpvpaper, but if felt overkill for my purposes.

Comparing to oguri, awww uses less cpu power to animate once it has cached all the frames in the animation. It should also be significantly more memory efficient.

The second is that, when I first wrote this, I coulnd't find any wallpaper daemon for wayland that allowed you to change the wallpaper at runtime. That is, in order to, for example, cycle through the images of a directory, you had to kill the daemon and restart it. However, this is no longer true, as there is wpaperd (and maybe wasn't back then either and I just didn't find it).

Usage

Start by initializing the daemon:

awww-daemon

Then, in a different terminal, simply pass the image you want to display:

awww img <path/to/img>
# You can also specify outputs:
awww img -o <outputs> <path/to/img>
# Control how smoothly the transition will happen, as well as its frame rate.
# --transition-step: smaller values = smoother. Default is 2 if --transition-type is `simple`, and 90 if it is not.
# --transition-fps: Default = 30.
awww img <path/to/img> --transition-step <1 to 255> --transition-fps <1 to 65535>
# There are also many different transition effects:
awww img <path/to/img> --transition-type center
# Note you may also control the above by setting up the AWWW_TRANSITION_FPS,
# AWWW_TRANSITION_STEP, and AWWW_TRANSITION environment variables.
# To see all options, run
awww 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.

awww query

Finally, to stop the daemon, kill it:

awww kill

For a more complete description, run awww --help or awww <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.

Transitions

Example wipe transition:

wipe transition with angle set to 30 deg

top transition demonstration

The left, right, top and bottom transitions all work similarly.

Example outer transition

outer transition demonstration

The center transition is the opposite: it starts from the center and goes towards the edges.

There is also simple, which simply fades into the new image, any, which starts at a random point with either center of outer transitions, and random, which selects a transition effect at random.

Troubleshooting

High cpu usage during caching of a gif's frames

awww will use a non-insignificant amount of cpu power while caching the images. This will be specially noticeable if the images need to be resized before being displayed. So, if you have a very large gif, I would recommend resizing it before sending it to awww. That would make the caching phase much faster, and thus ultimately reduce power consumption. I can personally recommend gifsicle for this purpose.

Wallpaper disappears when reconnecting monitor

awww used to cache its images so that it could reload the current the last displayed image automatically. This lead to many problems and also proved to be very annoying to keep working with when we updated to sctk 0.17. So I decided to nuke it.

If you want a wallpaper to be set automatically when you reconnect to a monitor, you should use a combination of scripts and a program that lets you run commands when a new output is connected, like kanshi.

About new features

Broadly speaking, NEW FEATURES WILL NOT BE ADDED, UNLESS THEY ARE EGREGIOUSLY SIMPLE. I made awww with the specific usecase of making shell scripts in mind. So, for example, stuff like timed wallpapers, or a setup that loads a different image at different times of the day, and so on, should all be done by combining awww with other programs (see the example_scripts for some examples).

If you really want some new feature within awww itself, I would recommend forking the repository.

Alternatives

awww isn't really the simplest, mostest minimalest software you could find for managing wallpapers. If you are looking for something simpler, have a look at the awesome-wayland repository list of wallpaper programs . I can personally recommend:

  • wbg - probably the simplest of them all. Strongly recommend if you just care about setting a single png as your permanent wallpaper on something like a laptop.
  • swaybg - made by the wlroots gods themselves.
  • mpvpaper - if you want to display videos as your wallpapers. This is also what I used for gifs before making awww.
  • kitty - you can use the kitty terminal emulator with its panel kitten to have the output of an arbitrary TUI program such as htop or btop or similar as your desktop wallpaper.

Acknowledgments

A huge thanks to everyone involved in the smithay project. Making this program would not have been possible without it. In fact, the first versions of awww were quite literally copy pasted from the layer shell example in the client-toolkit .

A big thank-you also to HakierGrzonzo, for setting up the AUR package.

Wallpapers used in this README

Pixel Art, by Waneella - https://www.patreon.com/waneella

Gradient - https://www.behance.net/gallery/86128681/Free-Unicorn-Vector-Gradients

Silhouette of Skyway - https://unsplash.com/photos/silhouette-of-skyway-UUJzCuHUfYI