Skip to content

Generate Adwaita folder icons with custom svg overlayed over them

Notifications You must be signed in to change notification settings

dotterian/adwaita-folder-icon-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Adwaita Color Folder Generator

A bash script to generate custom Adwaita-styled folder icons by overlaying an SVG symbol onto the standard Adwaita folder base. It automatically adapts to all installed Adwaita color variants (Blue, Green, Red, etc.).

Features

  • Theme Aware: Automatically finds all Adwaita variants on your system.
  • Smart Coloring: Extracts the "dark" theme color from the base icon to color your overlay.
  • Stroke/Fill Support: Correctly handles both stroke-based and fill-based SVG overlays, propagating line attributes.
  • Batch Installation: Efficiently installs icons with a single sudo prompt.
  • Cache Updates: Automatically updates the icon cache after installation.

Usage

./generate_folder_icon.sh [options] <path_to_overlay.svg>

Options

Flag Description
-i Install Mode. Automatically installs generated icons to their respective theme directories (requires sudo).
-n <name> Custom Name. Specify the output filename suffix (e.g., -n myicon -> folder-myicon.svg). Default is the input filename.

Examples

1. Generate icons locally (test run):

./generate_folder_icon.sh ~/Downloads/heart.svg

Generates output/Adwaita/folder-heart.svg, output/Adwaita-blue/folder-heart.svg, etc.

2. Install icons to system:

./generate_folder_icon.sh -i ~/Downloads/heart.svg

Installs to /usr/share/icons/... or ~/.local/share/icons/... depending on where themes are located.

3. Install with a custom name:

./generate_folder_icon.sh -i -n favorite ~/Downloads/heart.svg

Installs as folder-favorite.svg instead of folder-heart.svg.

4. Set generated icon for specified path

gio set <path> metadata::custom-icon-name <icon_name>

example:

gio set ~/Documents metadata::custom-icon-name folder-heart

Requirements

  • Linux OS with Adwaita icon themes installed.
  • Standard utilities: bash, sed, grep, awk, find.
  • sudo access (only for installation mode).
  • Best works with simplest svg's without gradients, clip-paths or other weird things.

About

Generate Adwaita folder icons with custom svg overlayed over them

Resources

Stars

Watchers

Forks

Contributors

Languages