A simple CLI utility to add rounded borders, padding, and shadows to images.

Overview

shadower

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

GitHub GitHub top language Crates.io AUR votes wakatime

Installation

From AUR

paru -S shadower-git

From source

cargo build --release

From crates.io

cargo install shadower

Usage

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

  • wl-paste | shadower | wl-copy
  • shadower < image.png > image_shadow.png
  • grimblast save active - | shadower | wl-copy

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.
You can also use the clamp(min, val, max) function to clamp a function to a given min and max, or if you only need a min or max, put _ in the unnecessary value. (clamp(_, 20, 10) is min(20, 10))

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:

radius="20"
padding_x="15 + max/2"

You can use environment variables, they will be expanded.

The default config values are always displayed in the --help.

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.

You might also like...
Install a package with e.g. `hdn add pkgs.hello`
Install a package with e.g. `hdn add pkgs.hello`

hdn: utility for updating home.nix Home Manager is great, but it's tedious to run home-manager edit, add your package to the file, and run home-manage

A simple Node.js library to convert raster images into svg
A simple Node.js library to convert raster images into svg

@neplex/vectorizer A simple Node.js library to convert raster images into svg using VTracer, with time complexity of O(n). Installation npm install @n

CLI utility that screencaptures your Linux desktop and streams it to Kodi via UPNP/DLNA and RTSP

desktopcast Desktopcast is a little CLI application that allows you to cast your Linux desktop to any UPNP/DLNA device capable of the AVTransfer servi

 This CLI utility facilitates effortless manipulation and exploration of TOML, YAML, JSON and RON files.
This CLI utility facilitates effortless manipulation and exploration of TOML, YAML, JSON and RON files.

📁💻🔍🔧 This CLI utility facilitates effortless manipulation and exploration of TOML, YAML, JSON and RON files.

Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

A CLI utility installed as
A CLI utility installed as "ansi" to quickly get ANSI escape sequences. Supports the most basic ones, like colors and styles as bold or italic.

'ansi' - a CLI utility to quickly get ANSI escape codes This Rust project called ansi-escape-sequences-cli provides an executable called ansi which ca

Cornucopia is a small CLI utility resting on tokio-postgres and designed to facilitate PostgreSQL workflows in Rust

Cornucopia Generate type checked Rust from your SQL Install | Example Cornucopia is a small CLI utility resting on tokio-postgres and designed to faci

Rust CLI utility library. Error handling, status reporting, and exit codes.
Rust CLI utility library. Error handling, status reporting, and exit codes.

narrate This library provides CLI application error and status reporting utilities. The coloured output formatting aims to be similar to Cargo. Error

Safer Nostr is a service that helps protect users by loading sensitive information (IP leak) and using AI to prevent inappropriate images from being uploaded.

Safer Nostr is a service that helps protect users by loading sensitive information (IP leak) and using AI to prevent inappropriate images from being uploaded. It also offers image optimization and storage options. It has configurable privacy and storage settings, as well as custom cache expiration.

Comments
  • added cli arguments with clap

    added cli arguments with clap

    todo:

    • more color formats // rgba(r, g, b, a); accept [0.0, 1.0] instead of [0, 255]
    • add some option to allow the user to pick a specific number of pixels for the shadow offset and padding instead of a ratio
    • IDK
    opened by jacekpoz 2
Owner
Michał
stuck on full-stack
Michał
Simple CLI to (add, delete, update, create) i18n translation file 🔤 🦀

, Inrs Simple CLI to (add, delete, update, create) i18n translation file Copyright (C) 2020-2022 TheAwiteb https://github.com/TheAwiteb/inrs This pr

TheAwiteb 4 Oct 4, 2022
A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

AiBro This is your own little coding bro, immersed in the world of AI, crypto, and all other types of over hyped tech trends. You can pipe it code and

Josh Bainbridge 5 Sep 5, 2023
The official CLI for FlakeHub: search for flakes, and add new inputs to your Nix flake.

fh, the official FlakeHub CLI fh is a scrappy CLI for searching FlakeHub and adding new inputs to your Nix flakes. Usage Using fh from FlakeHub: nix s

Determinate Systems 35 Oct 11, 2023
Add CLI & form interface to your program

Add CLI & form interface to your program

null 292 Nov 4, 2022
A simple CLI tool to convert the images to ASCII art with rust 🦀💙

aarty: A simple CLI tool to convert images to ASCII art with Rust ?? More screenshots Original image Original image Original image Original image Orig

Anas Elgarhy 26 Feb 13, 2023
CLI for video images. Generates animated video contact sheets fast.

vimg CLI for video images. Generate animated video contact sheets fast. Uses ffmpeg. Note: Support for animated avif isn't everywhere yet, try viewing

Alex Butler 4 Mar 12, 2023
A CLI tool that converts images to ASCII art.

Rust ASCII Art Converter This Rust tool converts images into ASCII art. It takes an image file as input, resizes it according to specified width and h

TheD24 133 Dec 3, 2023
Add path effects to open glyphs in a UFO file

ufostroker Add path effects to open contours in a UFO file Given a glyph with open contours: You can apply a noodle effect: ufostroker -i Open.ufo -o

Simon Cozens 5 Jun 28, 2021
Generate commands that add node_modules/.bin to PATH

npx-bin-helper Generate commands that add node_modules/.bin to PATH. Supports Linux, MacOS and Windows. Installation cargo install npx-bin-helper Usag

Yumeoto Zorin 2 Nov 11, 2022
This is a placeholder repository for Ludum Dare 52. We'll add more soon!

Ludum Dare 52 This is a placeholder repository for Ludum Dare 52. How to play TBD Developing Only Rust (edition 2021) is required to develop and build

Matan Lurey 4 Jan 9, 2023