LinuxCommandLibrary

wal

Change system colorscheme from an image

TLDR

Preview color scheme

$ wal --preview [image.png]
copy

Create color scheme
$ wal -i [image.png]
copy

Create a light color scheme
$ wal -i [image.png] -l
copy

Skip setting the desktop wallpaper
$ wal -i [image.png] -n
copy

Skip setting the terminal colors
$ wal -i [image.png] -s
copy

Restore the previously generated color scheme and wallpaper
$ wal -R
copy

SYNOPSIS

wal [OPTION]... [IMAGE|DIRECTORY]

PARAMETERS

-i, --image IMAGE
    Target image or directory for color generation

-a, --alpha ALPHA
    Alpha/transparency value (0.0-1.0, default 1.0)

-l, --light
    Generate lighter color scheme

-d, --delete-cache
    Delete wal cache directory

-R, --recursive
    Recursively scan directory for images

-g, --iterative
    Iteratively generate from directory images

-n, --preview
    Preview colors without applying changes

-t, --theme FILE
    Load colors from theme file

-r, --restore
    Restore last applied colorscheme

-e, --backend EXE
    Execute backend script post-generation

-q, --quiet
    Suppress non-essential output

-s, --saturation VALUE
    Adjust saturation (0-6 range)

-f, --foreground
    Print foreground color only

-b, --backend-arg ARG
    Pass argument to backend (repeatable)

-c
    Alias for --delete-cache

-V, --version
    Show version info

-h, --help
    Display help

DESCRIPTION

wal is a command-line tool that automatically generates and applies color schemes extracted from wallpaper images across your Linux desktop environment. It analyzes the dominant colors in an image using ImageMagick, creating a 16-color ANSI palette plus special colors like foreground, background, and cursor. These colors propagate to terminals (Alacritty, Kitty, WezTerm), Xresources for GUI apps, and more via backend scripts.

Ideal for "ricing" enthusiasts, wal ensures consistent theming without manual editing. Run wal -i image.jpg to set colors from an image; it caches schemes for restoration. Supports light themes, saturation tweaks, previews, and directory recursion. Backends handle app-specific configs, with templates for custom sequences.

Highly customizable, wal integrates with i3, polybar, rofi, and vim. Output includes JSON, Xresources, and sequences for broad compatibility.

CAVEATS

Primarily for X11; Wayland support limited (use wal-wayland ports). Requires ImageMagick. May override app configs unexpectedly.

CACHE FILES

Colors saved in $HOME/.cache/wal/: colors (hex list), colors.json, sequences.

TEMPLATES

Uses mustache syntax in ~/.config/wal/templates/ for dynamic app configs like vim, rofi.

BACKENDS

Scripts in ~/.config/wal/templates/ auto-run to theme apps; customizable via -e.

HISTORY

Created by dylanaraps in 2016 as pywal (Python-based). Rewritten in C for speed in 2019, renamed 'wal'. Actively maintained on GitHub; v3.3+ emphasizes performance and backend extensibility.

SEE ALSO

xrdb(1), feh(1), convert(1), kitty(1)

Copied to clipboard