Build from Source
Compile and install Sweets from a local checkout, with the build and runtime dependencies for Arch, Fedora, and Debian/Ubuntu.
Sweets builds with Meson and Ninja against wlroots 0.20. This page covers the dependencies, the build, a quick nested test, and a system install.
Sweets requires wlroots 0.20 specifically — wlroots makes breaking changes
between minor releases. Arch packages it as wlroots0.20. On distributions
that do not yet package 0.20, build and install
wlroots 0.20 from source
first, then build Sweets.
Dependencies
| Dependency | Why it's needed |
|---|---|
meson, ninja, pkg-config, a C compiler | Build system and toolchain (C11) |
wayland-scanner | Generates protocol headers at build time |
wlroots-0.20 | Backend, renderer, scene graph, protocols |
wayland / wayland-protocols | Core Wayland server libraries |
libxkbcommon | Keyboard keymaps |
pixman | Pixel-region math |
libinput | Physical input devices |
lua 5.4 | Configuration (sweets.lua) |
Runtime extras for a complete desktop (optional, but recommended):
| Package | Why it's needed |
|---|---|
xdg-desktop-portal | Portal frontend used by sandboxed and toolkit apps |
xdg-desktop-portal-wlr | Screenshot and screencast backend (wlr-screencopy) |
xdg-desktop-portal-gtk | File-chooser, settings, and other portal fallbacks |
foot | Terminal opened by the default MOD+Return binding |
wireplumber, brightnessctl, playerctl | Targets of the default media-key bindings |
Sweets installs its own portal preferences
(xdg-desktop-portal/sweets-portals.conf), routing screenshot/screencast to
the wlroots backend and everything else to GTK. The portals only need to be
installed — no manual config is required.
Arch Linux
# Build dependencies
sudo pacman -S --needed base-devel meson ninja pkgconf \
wlroots0.20 wayland wayland-protocols libxkbcommon pixman lua54 libinput
# Runtime extras (recommended)
sudo pacman -S --needed xdg-desktop-portal xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk foot wireplumber brightnessctl playerctlMeson resolves Lua through the lua5.4 pkg-config file, which on Arch is
provided by the lua54 package (not lua).
Fedora
# Build dependencies
sudo dnf install gcc meson ninja-build pkgconf-pkg-config wayland-devel \
wayland-protocols-devel wlroots-devel libxkbcommon-devel pixman-devel \
lua-devel libinput-devel
# Runtime extras (recommended)
sudo dnf install xdg-desktop-portal xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk foot wireplumber brightnessctl playerctlDebian / Ubuntu
# Build dependencies
sudo apt install build-essential meson ninja-build pkg-config libwayland-bin \
libwayland-dev wayland-protocols libxkbcommon-dev libpixman-1-dev \
liblua5.4-dev libinput-dev
# Runtime extras (recommended)
sudo apt install xdg-desktop-portal xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk foot wireplumber brightnessctl playerctlCurrent Debian and Ubuntu releases do not ship wlroots 0.20. Build it from
source (it uses the same Meson workflow) and install it before configuring
Sweets, otherwise meson setup will fail to find wlroots-0.20.
Build
Clone the repository:
git clone https://github.com/naurissteins/Sweets.git
cd SweetsConfigure and compile:
meson setup build
ninja -C buildThe compositor lands at build/sweets and the CLI at build/sweetctl.
Confirm it built:
./build/sweets -V # print versionTest it nested
Run the freshly built binary from inside your current Wayland or X session and it opens as a nested window — safe to click into and experiment with:
./build/sweets -d # -d enables debug loggingPress Super + Return for a terminal. See Key Bindings
for the default bindings.
Logs
Every normal Sweets run gets its own private log file:
~/.local/state/sweets/sessions/sweets-<UTC timestamp>-<pid>.log~/.local/state/sweets/sweets.log is a symlink to the current session, so it
remains the convenient path for tail -f. Sweets retains the newest ten
session logs and limits each default session log to 20 MiB. If that limit is
reached, logging continues on stderr rather than using more disk space.
Repeated DRM page-flip busy errors are condensed into periodic summaries, so a
temporary display-driver issue does not flood the session log.
Use -l <path> to write to one explicit custom log file instead. That mode
does not create a session archive, symlink, retention cleanup, or size cap.
Install system-wide
sudo meson install -C buildThis installs the sweets and sweetctl binaries, the default
sweets.lua, the portal preferences, and the systemd user session target.
To run from a free virtual terminal:
sweetsTo add a Sweets entry to your display manager, install the packaged session launcher and desktop file from the source tree:
sudo install -Dm755 packaging/sweets-session /usr/local/bin/sweets-session
sudo install -Dm644 packaging/sweets.desktop \
/usr/share/wayland-sessions/sweets.desktopThen pick Sweets at the login screen.
Next steps
- Key Bindings — default and custom bindings
- Configuration — the Lua API and defaults