Beta v0.1.0

garbg

Async wallpaper daemon with animation support and native gar integration

garbg is the wallpaper management component of the gardesk ecosystem. Built in Rust with async Tokio runtime, it handles static images, animated GIFs, WebP, and APNG files with configurable frame rates. Supports multiple wallpaper sources including local files, HTTP URLs, and GitHub repositories. Features per-workspace and per-monitor wallpapers, slideshow rotation with shuffle, and comprehensive IPC control via garbgctl.

🎯 RPM Available

Features

Installation

RPM (Fedora/RHEL)

terminal
$sudo dnf config-manager --add-repo https://repos.musicsian.com/musicsian.repo
$sudo dnf install garbg garbgctl

From Source

terminal
$git clone https://github.com/espadon/gardesk
$cd gardesk/garbg
$cargo build --release
$sudo cp target/release/garbg /usr/local/bin/
$sudo cp target/release/garbgctl /usr/local/bin/

Dependencies

garbg requires the following runtime dependencies:

  • xcb - X11 protocol bindings for pixmap management
  • image - Rust image loading and manipulation
  • gif - GIF decoding with frame timing

Quick Start

Set a wallpaper immediately with the set command:

terminal
$garbg set ~/Pictures/wallpaper.jpg
Set wallpaper: /home/user/Pictures/wallpaper.jpg

Set from Directory (Slideshow)

terminal
$garbg set ~/Pictures/Wallpapers --interval 300 --shuffle
Set wallpaper source: /home/user/Pictures/Wallpapers (12 images) Slideshow enabled: 300s interval, shuffle on

Set Animated Wallpaper

terminal
$garbg set ~/Pictures/animated.gif --animate --max-fps 30
Set animated wallpaper: /home/user/Pictures/animated.gif Animation: 24 frames at 30 FPS max

Set from GitHub

terminal
$garbg set github://catppuccin/wallpapers/landscapes
Fetching from GitHub: catppuccin/wallpapers/landscapes Found 47 images Set wallpaper: pexels-photo-1563355.jpg

Scaling Modes

Control how wallpapers are scaled to fit your screen:

terminal
$garbg set ~/wallpaper.jpg --mode fill # Crop to fill screen (default)
$garbg set ~/wallpaper.jpg --mode fit # Fit within screen, letterbox
$garbg set ~/wallpaper.jpg --mode stretch # Stretch to fill, may distort
$garbg set ~/wallpaper.jpg --mode center # Center at original size
$garbg set ~/wallpaper.jpg --mode tile # Tile to fill screen

Daemon Mode

Run garbg as a daemon for persistent wallpaper management and slideshow support:

terminal
$garbg daemon
INFO Starting garbg daemon INFO Listening on /run/user/1000/garbg.sock INFO Ready for commands

systemd Service

When using gar, garbg starts automatically via systemd user services:

# ~/.config/systemd/user/garbg.service
[Unit]
Description=garbg wallpaper daemon
PartOf=gar-session.target
After=gar.service

[Service]
ExecStart=/usr/bin/garbg daemon
Restart=on-failure

[Install]
WantedBy=gar-session.target

Controlling the Daemon

Use garbgctl to control the running daemon:

terminal
$garbgctl set ~/Pictures/new-wallpaper.jpg
$garbgctl next # Next in slideshow
$garbgctl prev # Previous in slideshow
$garbgctl random # Random from source
$garbgctl pause # Pause animations/slideshow
$garbgctl resume # Resume animations/slideshow
$garbgctl status # Get current status

File Locations

  • Config: ~/.config/garbg/config.toml
  • Cache: ~/.cache/garbg/
  • PID file: $XDG_RUNTIME_DIR/garbg.pid
  • Socket: $XDG_RUNTIME_DIR/garbg.sock
  • Playlist state: ~/.local/state/garbg/playlist.json
  • Logs: journalctl --user -u garbg.service