shadower

a simple command-line utility to add rounded corners and shadows to images

Building:

  1. make sure you have rust installed
  2. cargo build --release

Usage

shadower by default reads the image from stdin and outputs it to stdout, so here are some non-config examples:

However, you can also customize every aspect of the rounding, shadows, and padding of the images. To do so, you can use math expressions, which let you dynamically calculate the values depending on the size of the input image. For example, setting the --offset-y to max / 6 / 4, while running on a 800x600px image, will result in the shadow being offset down by 33.(3)px. To view all the flags, use --help.

Config file

You can also configure shadower using a config file instead of the flags. The default config location is $XDG_CONFIG_HOME/shadower/config.toml, but you can override it using the --config flag. The config file can change every option (except the --config), and you just have to put the values in. The keys have to use snake_case instead of kebab-case.

Example config:

toml radius="20" padding-x = "15 + max/2"

You can use environment variables, they will be expanded.

Note: flags have priority over the config file

Contributing

  1. Make a fork
  2. Make your changes
  3. Commit the changes (please use conventional commits!)
  4. Create a PR

No need to ask me if you can implement something, if I think it's a good thing I'll merge it in.