wallust(5)

NAME
wallust - TOML configuration file format.

GENERAL

Some general variables that can be configured in the wallust.toml file. All variables are optional, as wallust can work without a config file and choose default implementations. Keep in mind that backend and palette share possible values with the cli, see wallust(1).

backend
    Allows you to choose which method to use in order to parse the image.

    full
        Read and return the whole image pixels more precision slower.

    resized
        Resizes the image before parsing mantaining it s aspect ratio.

    wal Uses image magick convert to generate the colors like pywal.

    thumb
        Faster algo hardcoded to 512x512 (no ratio respected).

    fastresize
        A much faster resize algo that uses SIMD. For some reason it fails on some images where resized doesn t for this reason it doesn t replace but rather it s a new option.

threshold
    Wallust automatically uses the best threshold (by my testings) if this variable isn't defined. If you really want to define this variable, keep in mind the following. Threshold is the difference between similar colors , used inside the colorspace. While each colorspace may have different results with different thresholds, meaning you should try which one works for you best , an "overall" and general table looks like this:
    Number | Description
    1 | Not Perceptible by human eyes.
    1 - 2 | Perceptible through close observation.
    2 - 10 | Perceptible at a glance.
    11 - 49 | Colors are more similar than opposite.
    100 | Colors are exact opposite.

palette
    How the image colors are processed into a palette.

    salience
        (default) Salience-based histogram palette. Perceptual salience picks the most visually prominent colors from the image.

    ansi
        ANSI terminal color palette. Orders colors to follow the classic TTY convention: color0 → black, color1 → red-ish, color2 → green-ish, and so on.

    kmeans
        k-means clustering palette. Groups pixels into clusters in Lab color space and uses the centroids as colors.

style
    Controls whether to generate a dark or light color scheme. (default: dark)

    dark
        Dark background, light foreground.

    light
        Light background, dark foreground.

salience
    Tuning options for the salience palette. Defined as an inline table, e.g. salience = { sampling = balanced , intensity = normal }

    sampling
        Controls how colors are sampled from the histogram. Possible values: high, balanced (default), distributed, low.

    intensity
        Controls the color intensity of the output palette. Possible values: normal (default), pastel, vibrant.

kmeans
    Tuning options for the kmeans palette. Defined as an inline table, e.g. kmeans = { k = 16, min_dist = 10.0 }

    k   Number of clusters. Higher values give more color diversity at the cost of computation time. (default: 16)

    min_dist
        Minimum perceptual distance (delta E) between kept centroids. Higher values produce more distinct colors. (default: 10.0)

use16cols
    Whether to dim down the lower half of the palette (color8–dash15), giving an illusion of 16 distinct colors. (default: false)

dynamic
    Dynamically adjusts the threshold to best fit the image. (default: false)

check_contrast
    Ensures a "readable contrast". Should only be enabled when you notice an unreadable contrast frequently happening with your images. The reference color for the contrast is the background color. (default: false)

saturation
    Color saturation adjustment.
    Possible values: 1 - 100 (default: disabled)

alpha
    Alpha value for templating (default: 100)

HOOKS
Commands to run after the palette is generated. Defined inside the [hooks] header. Each key is an arbitrary name, the value is the shell command to run.

    [hooks]
    notify = 'notify-send "New Scheme Generated!"'

TEMPLATED HOOKS
Like hooks, but the command is processed as a wallust template before execution. Defined inside the [templated_hooks] header. Skip with --no-templated-hooks

    [templated_hooks]
    notify2 = "notify-send 'wallust' 'Generated palette from {{wallpaper | basename}}'"

TEMPLATES
Templates are optional and defined inside the [templates] header. Here it's recommended to use single quotes (') instead of double quotes (") since the first one, by the toml format, ignores backslashes (\) as escape codes, allowing you to define Windows like paths (e.g. 'C:\Users\Desktop\')
To learn more about the syntax see wallust(1).

template
    A relative path that points to a file where wallust.toml is located, usually at '~/.config/wallust/'. This file can also be a directory, which will be templated recursively.

target
    Absolute path in which to place a file with generated templated values. This field CAN expand the `~` as the `$HOME` enviromental variable. If template is a directory, this must correspond and be one.

pywal optional
    Indicates to treat template as a pywal template, using {variable} syntax. (default: false)

max_depth optional
    This is variable is optional, by default disabled and thus, doesn't limit recursion. When enabled, it accepts a number that indicates the quantity of recursion level to accept, similar to du ... --max-depth 1 (and probably other utils).

EXAMPLES
Below is a simple example exhausting all possible cases. All the format is correct:

    backend = "wal"
    palette = "salience"
    style = "dark"
    salience = { sampling = "balanced", intensity = "normal" }
    check_contrast = true
    [templates]
    # dunst templates
    dunst.template = "dunstrc.monitor"
    dunst.target = "~/.config/dunst/dunstrc"
    # one liner for zathura
    zathura = { template = 'zath', target = '~/.config/zathura/zathurarc' }
    # even a shorter way, using directories, but only one level recursion
    glava = { src = 'glava', dst = '~/.config/glava/', max_depth = 1 }
    # or splited in the dotted syntax
    res.src = "xres"
    res.dst = "~/.config/Xresources"
    # old times, good times. Here I put old pywal templates.
    # NOTE THAT BOTH src AND dst ARE DIRECTORIES!
    pywal = { src = "templates/", dst = '~/.cache/wal/', pywal = true }
    [hooks]
    notify = 'notify-send "New Scheme Generated!"'
    [templated_hooks]
    notify2 = "notify-send 'wallust' 'Generated palette from {{wallpaper | basename}}'"

SEE ALSO
wallust(1), wallust-run(1), wallust-cs(1), wallust-theme(1), wallust-themes[1]

NOTES

. wallust-themes
    Suggestions for new colorschemes returned by the themes subcommand should be filled here.
    https://codeberg.org/explosion-mental/wallust-themes

BUGS

https://codeberg.org/explosion-mental/wallust