9
174
Fork
You've already forked wallust
21
"a better pywal", but it's more than that :) https://explosion-mental.codeberg.page/wallust
  • Rust 62%
  • Shell 17.2%
  • PowerShell 10.2%
  • Elvish 5%
  • CSS 1.4%
  • Other 4.2%
Find a file
FelipeSharkao e56187e965
Some checks failed
ci/woodpecker/push/check Pipeline failed
ci/woodpecker/push/nix-build Pipeline failed
ci/woodpecker/cron/flake-lock-update Pipeline was successful
Add cli flags for 'style' and 'use16cols' ( #214 )
- Add --style/-S for overwriting the `style` option, and --use16cols for overwriting the `use16cols` option
- Add a style variable in ninja and wal templates
I also updated documentation
Closes #213
Reviewed-on: #214 
2026年06月14日 05:58:27 +02:00
.woodpecker woodpecker: docs changes 2026年01月11日 01:22:35 -05:00
benches benches: require iter feature and refactor some of it's code 2024年02月18日 18:50:29 -05:00
completions update assets with wallust pick 2026年04月20日 15:29:35 +00:00
docs some precisions in the docs 2026年04月20日 15:53:13 +00:00
man update v3 comments/printlns/logic for v4. Also, add wallust-pywal and 2026年04月18日 21:33:45 +00:00
src Add cli flags for 'style' and 'use16cols' ( #214 ) 2026年06月14日 05:58:27 +02:00
tests update assets + some docs additionals 2026年04月18日 15:32:08 +00:00
.editorconfig add .editorconfig 2026年03月26日 18:34:54 -05:00
.envrc direnv integration, added .envrc #208 2026年03月26日 18:40:41 -05:00
.gitignore direnv integration, added .envrc #208 2026年03月26日 18:40:41 -05:00
book.toml book.toml: better defaults 2026年01月11日 01:08:07 -05:00
build.nix nix: fix build of wallust ( #67 ) 2024年07月25日 18:41:02 +00:00
build.rs add fzf searching with wallust theme list-fzf 2026年04月18日 15:32:08 +00:00
Cargo.lock update deps and assets 2026年04月18日 15:46:03 +00:00
Cargo.toml update docs and add configurable knobs for kmeans 2026年04月18日 20:59:13 +00:00
default.nix nix: fix build of wallust ( #67 ) 2024年07月25日 18:41:02 +00:00
flake.lock flake.lock: update ( #211 ) 2026年06月14日 05:57:02 +02:00
flake.nix fix small warning in flake.nix #208 2026年03月26日 18:40:04 -05:00
LICENSE root commit 2023年03月24日 17:54:06 -05:00
Makefile add wallust-pywal man page 2026年04月18日 21:12:02 +00:00
README.md new major pre-release version: 4.0.0-alpha 2026年04月20日 16:07:53 +00:00
schema.json add wallust-pywal man page 2026年04月18日 21:12:02 +00:00
wallust.toml much better default and commented wallust.toml 2026年04月18日 21:33:05 +00:00

wallust - Generate colors from an image

crates-io downloads license dependency-status status-badge CodeBerg MatrixChat


gif

sources: adwaita - scenic view of mountains - rms by marco novo - pixels - linus talking

This is a pre-release of the v4-alpha including many changes and new features, any discussions/issues are welcome.

If coming from v2, please check v3 breaking changes. If coming from v3, please check v4 ALPHA breaking changes.

Usage

wallust run my_wallpaper.png

use wallust -h for an overview and wallust --help for a more detailed explanation

Docs

For ease of use you can check detailed docs with man pages (rather than cmd -hing everytime):

  • man wallust, information about terminal colors and template syntax;
  • man wallust.5, config docs;
  • man wallust-subcommand, displays a man page for subcommand.

There is also a web page for documentation! It's based on plain markdown, so you could also read it locally at docs/ directory.

Why

I've started this tool mainly for speed reasons given that I use a keybinding that runs pywal with a random wallpaper image, this resulted in a noticeable delay in between, which was really annoying as I changed my wallpaper.

Now I know that pywal uses image magick convert to gather the colors, which caused the slowness in pywal, since convert takes some time by itself to gather the colors.

Wallust can also use convert with the wal backend, but it's even more powerful since it brings up integrated native methods (no need for external commands, like convert, but are nice if you have it), and even much more sofisticated algorithms like kmeans or the SIMD backend fast_resize. This made the need to let the user decide what fit best, instead of a raw hardcode.

While the goal was focused on speed, the use case move on to upgrade functionality that both wallust and the archived python tool shared.

I use rust given the great wide library (crates) that it offered and it's native capabilities. I also tried rewriting pywal in C after watching a tsoding video where he implmements a histogram in C for manipulating an image. That was the push I needed to start this journey on this rusty color theoryish codebase.

Features

  • Includes man pages and completions!
  • Feature rich templating:
    • You can use a subset of Jinja2 (default).
    • Alternatively, simply use the pywal syntax (requires selecting it on the config file).
  • Sets terminal colors on all (or the current, -u) active terminals:
  • Cache scheme palettes, overwritten by -w:
    • Linux: $XDG_CACHE_HOME or $HOME/.cache
    • MacOs: $HOME/Library/Caches
    • Windows: {FOLDERID_LocalAppData}
  • Read pywal/terminal-sexy colorschemes with wallust cs.
  • Built-in themes with wallust theme (compile time feature).
  • Configuration file at wallust.toml (but wallust can work without one!):
    • wallust checks for ~/.config/wallust/wallust.toml for the config file, if not found it will use default implementations.
    • Configuration variables are avaliable as cli flags.
    • Configurable methods for backends, palettes and threshold.
    • OS dependant path:
      • Linux: $XDG_CONFIG_HOME or $HOME/.config
      • MacOs: $HOME/Library/Application Support
      • Windows: {FOLDERID_RoamingAppData}
Methods Description
Backends How to extract the colors from the image. (e.g pywal uses convert)
Palette Makes a scheme palette with the gathered colors, configurable by a threshold (e.g. sets light or dark background)

Installation

You can see if your distro has wallust in their repos by the following chart. For detail information you can check some distro installation instruction that the maintainers have left.

With cargo

cargo install wallust

This will use the lastest (non pre-release) version.

With git

Simply git clone https://codeberg.org/explosion-mental/wallust.

Recommended way is to use the Makefile, since this will install man pages and completions.

  1. Edit Makefile to meet your local setup (should be fine as is for most linux distros).
  2. Build it with make
  3. Install wallust (if necessary as root): make install

Optionally, installing only the binary can be done with the following, which moves the binary into your $CARGO_HOME/bin:

cargo install --path .

or build it and copy the binary to one folder present in your $PATH like /usr/local/bin

cargo build --release
cp -f ./target/release/wallust /usr/local/bin

Related