Sweets

Installation

Install and start the Sweetbg wallpaper daemon

Sweetbg is a small Wayland wallpaper daemon. It has two binaries:

BinaryRole
sweetbgdThe daemon. Draws the wallpaper
sweetbgThe client. Sends commands to the daemon

Supports JPEG, PNG, and WebP. Needs a compositor with zwlr_layer_shell_v1, which Sweets has. On FreeBSD, see FreeBSD.

Arch Linux

yay -S sweetbg-bin

Use sweetbg-git for the development branch.

NixOS

Try it without installing:

nix run github:sweetwm/sweetbg -- --version

Or add it to your flake:

# flake.nix inputs
sweetbg.url = "github:sweetwm/sweetbg";

# configuration (pass inputs to your modules via specialArgs)
nixpkgs.overlays = [ inputs.sweetbg.overlays.default ];
environment.systemPackages = [ pkgs.sweetbg ];

# systemd user service
systemd.packages = [ pkgs.sweetbg ];
systemd.user.services.sweetbgd.wantedBy = [ "graphical-session.target" ];

Build from source

Requirements:

  • wayland-client, wayland-protocols, wayland-scanner
  • libpng, libjpeg, libwebp
  • Meson, Ninja, and a C11 compiler
  • scdoc for man pages
  • systemd for the optional user service
git clone https://github.com/sweetwm/sweetbg.git
cd sweetbg
meson setup build --buildtype=release
ninja -C build
sudo ninja -C build install

Start the daemon

Pick one.

With Sweets:

sweets.exec_once({ "sweetbgd" })

With systemd:

systemctl --user enable --now sweetbgd.service

Only one daemon can run at a time. Then set a wallpaper:

sweetbg img ~/Pictures/wall.jpg --persist

--persist saves it, so it comes back on the next login.

Something not working? Run sweetbg doctor. It checks the session, config, socket, and daemon.

On this page