Skip to content

xi-Rick/icon-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Icon Maker β€” Linux Icon Theme Packer

Icon Maker Version License Bash Python

Download any icon set from Wallpapers Clan and pack it into a fully compliant Linux icon theme tarball.

From aesthetic icons to a system-ready theme in minutes!


🌟 What Is Icon Maker?

This script grabs icon packs from Wallpapers Clan (or any page with downloadable icons), automatically organizes them into a proper Linux icon theme hierarchy, generates symlinks for every standard size, maps app names to your pack's icons, and installs the result β€” all with a single command.


Screenshot 1 Screenshot 2 Screenshot 3

✨ Key Features

  • 🎯 Auto-download from any Wallpapers Clan page (zip packs or image scraping)
  • 🧬 Smart sizing β€” detects icon pixel dimensions and places them in correct size directories, with automatic context detection (apps / actions / mimetypes)
  • πŸ”— Full-size coverage β€” symlinks original icons into all standard sizes (16Γ—16 through 256Γ—256); alias symlinks (mapped names) live only in the primary size directory
  • 🧠 Curated name mapping β€” knows what Linux calls each app (Discord β†’ discord, Chrome β†’ google-chrome, etc.)
  • πŸ”€ Hash-based fallback β€” distributes remaining system icons across your pack's artwork
  • 🎨 Shape masking β€” apply rounded corners or circular masks to all icons with --shape rounded|circle
  • πŸ–ŒοΈ Interactive icon picker β€” hand-pick which icon maps to each app via yad/zenity GUI
  • πŸ”„ Auto-reset on install β€” old custom icon overrides are cleared when generating a new theme; standalone --picker mode preserves existing mappings
  • πŸ“¦ Standards-compliant β€” generates a proper index.theme with Directories, Context, and Type sections
  • ⚑ Auto-install β€” places the theme in ~/.icons/, runs gtk-update-icon-cache, and refreshes GTK
  • πŸ–ΌοΈ Scalable SVG support β€” detects and places SVGs in the scalable directory

πŸš€ Quick Start

Requirements

# Arch / Manjaro
sudo pacman -S curl python python-pillow
# Optional for icon picker:
sudo pacman -S yad       # or zenity

# Debian / Ubuntu
sudo apt install curl python3 python3-pil
# Optional for icon picker:
sudo apt install yad     # or zenity

# Fedora
sudo dnf install curl python3 python3-pillow
# Optional for icon picker:
sudo dnf install yad     # or zenity

Usage

# Clone the repo
git clone https://github.com/xi-Rick/icon-maker.git
cd icon-maker

# Make it executable
chmod +x icon-maker.sh

# Basic usage
./icon-maker.sh <URL> <theme_name>

# With shape masking
./icon-maker.sh --shape rounded <URL> <theme_name>
./icon-maker.sh --shape circle <URL> <theme_name>

# Run icon picker on an already-installed theme (no download)
./icon-maker.sh --picker <theme_name>
./icon-maker.sh -p <theme_name>

All Flags

Flag Description
--shape rounded Apply rounded corners to all icons (radius = 20% of icon size)
--shape circle Crop all icons into a perfect circle
--picker <theme> / -p <theme> Skip download/processing; open the icon picker on an already-installed theme

Example

# Download One Piece app icons with rounded corners
./icon-maker.sh --shape rounded https://wallpapers-clan.com/app-icons/one-piece/ One-Piece

# Re-open the icon picker later
./icon-maker.sh -p One-Piece

🎯 How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  1. Fetch page HTML (curl / Firefox headless)        β”‚
β”‚     ↓                                                β”‚
β”‚  2. Extract download URL (zip > images)              β”‚
β”‚     ↓                                                β”‚
β”‚  3. Download & extract zip OR scrape images          β”‚
β”‚     ↓                                                β”‚
β”‚  4. Detect icon sizes & organize into dirs           β”‚
β”‚   β”œβ”€ 16Γ—16/apps/ (symlinks β†’ primary size)           β”‚
β”‚   β”œβ”€ 22Γ—22/apps/                                     β”‚
β”‚   β”œβ”€ 24Γ—24/apps/                                     β”‚
β”‚   β”œβ”€ … (16,22,24,32,48,64,128,256)                   β”‚
β”‚   └─ <size>Γ—<size>/apps/ (Type=Scalable, aliases)    β”‚
β”‚     ↓                                                β”‚
β”‚  5. [Optional] Apply shape mask (--shape)            β”‚
β”‚     β”œβ”€ --shape rounded β†’ rounded corners             β”‚
β”‚     └─ --shape circle  β†’ circular mask               β”‚
β”‚     ↓                                                β”‚
│  6. Normalize filenames (lowercase, spaces→hyphens)  │
β”‚     ↓                                                β”‚
β”‚  7. Map Linux app names β†’ pack icons                 β”‚
β”‚     β”œβ”€ Phase 1: Curated name map                     β”‚
β”‚     └─ Phase 2: Hash-distribution fallback           β”‚
β”‚     ↓                                                β”‚
β”‚  8. Generate index.theme                             β”‚
β”‚     ↓                                                β”‚
β”‚  9. [Optional] Interactive icon picker (yad/zenity)  β”‚
β”‚     β”œβ”€ Clears overrides on fresh install             β”‚
β”‚     β”œβ”€ Preserves overrides in --picker mode          β”‚
β”‚     └─ Lets you hand-pick per-app icon mappings      β”‚
β”‚     ↓                                                β”‚
β”‚ 10. Package as .tar.gz & install to ~/.icons/        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

What Gets Created

When you run the script, your theme directory looks like this:

~/.icons/<theme_name>/
β”œβ”€β”€ index.theme
β”œβ”€β”€ 16Γ—16/
β”‚   └── apps/
β”‚       β”œβ”€β”€ discord.png          # symlink β†’ 180Γ—180/apps/discord.png
β”‚       └── …                    # 80 original symlinks (no alias symlinks)
β”œβ”€β”€ 22Γ—22/
β”‚   └── apps/                    # same 80 entries as 16Γ—16
β”œβ”€β”€ 24Γ—24/
β”‚   └── apps/
β”œβ”€β”€ 32Γ—32/
β”‚   └── apps/
β”œβ”€β”€ 48Γ—48/
β”‚   └── apps/
β”œβ”€β”€ 64Γ—64/
β”‚   └── apps/
β”œβ”€β”€ 128Γ—128/
β”‚   └── apps/
β”œβ”€β”€ 256Γ—256/
β”‚   └── apps/
β”œβ”€β”€ 180Γ—180/                     # primary size (Type=Scalable)
β”‚   └── apps/
β”‚       β”œβ”€β”€ discord.png          # actual file
β”‚       β”œβ”€β”€ vesktop.png β†’ discord.png  # alias symlink
β”‚       β”œβ”€β”€ google-chrome.png β†’ discord.png  # hash-distributed alias
β”‚       └── …                    # 255+ alias symlinks
└── scalable/                    # only if SVGs are present
    └── apps/

πŸ“¦ What's Inside

Smart Name Mapping

The script knows what Linux calls your apps. A curated map covers 40+ popular applications:

Pack Icon Mapped To
discord vesktop, discord, com.discordapp.Discord
firefox firefox, mozilla-firefox, org.mozilla.firefox
spotify spotify, spotify-client, spotify-launcher, com.spotify.Client
code code, vscode, visual-studio-code, com.visualstudio.code, codium
terminal org.gnome.Terminal, gnome-terminal, Alacritty, konsole, kgx, io.mitchellh.ghostty
files org.gnome.Nautilus, nautilus, caja, dolphin, thunar, nemo
game steam, lutris, heroic, net.lutris.Lutris, games

For anything not in the curated list, the script uses deterministic hash-based distribution β€” so every .desktop file on your system gets some icon from the pack.

Automatic Normalization

Spaces and uppercase are normalized; underscores are preserved for Flatpak-style IDs:

"discord icon.png" β†’ discord-icon.png  # lowercased, spaces β†’ hyphens
"my_cool_app.png"  β†’ my_cool_app.png   # underscore preserved

Full Theme Compliance

The generated index.theme includes:

  • [Icon Theme] header with Name, Comment, Inherits=hicolor
  • Per-directory sections with correct Size, Context, and Type
  • Standard size dirs (16,22,24,32,48,64,128,256) get Type=Fixed
  • Non-standard size dirs (e.g. 180Γ—180) get Type=Scalable MinSize=1 MaxSize=512 so alias symlinks are found at any requested size
  • Context: Applications (icons default to apps/ context)

βœ… Tested On

OS Compositor Shell Status
CachyOS (Arch-based) Niri (Wayland) Noctalia Shell Full β€” download, shape masking, icon picker, install, --picker re-entry

πŸ›‘οΈ Error Handling & Fallbacks

Cloudflare Detection

If the page is behind Cloudflare, the script tries Firefox headless:

# Needs Firefox installed
firefox --headless --dump-dom "$URL" > page.html

Multiple Extraction Strategies

  1. Direct zip download β€” looks for href="*ICONS*.zip", then falls back to any .zip link, data-downloadurl, single-quoted href, data-href/data-url/data-file attributes, and known path patterns (/wp-content/uploads/app-icons/)
  2. Image scraping β€” extracts all <img src="..."> URLs as a last resort

Dependency Checks

Tool Required For
curl Page & file downloads
grep / sed URL extraction
python3 Image processing, name mapping, normalization, index.theme generation
Pillow (PIL) Reading image dimensions, shape masking
yad / zenity (Optional) Interactive icon picker GUI

🎨 Credits & Acknowledgements

Icon Source

All icon artwork is sourced from Wallpapers Clan β€” a digital space created by the W-Clan crew.

"W-Clan is a crew of people who love stylish things. So we created a digital space with fresh wallpapers and aesthetic app icons for everyone to adorn their phones."

Show them some love:

Platform Link
🌐 Website wallpapers-clan.com
πŸ‘₯ Community W-Clan Gang
πŸ“Έ Instagram @wallpapers.clan
🐦 Twitter / X @wallpapersclan
πŸ“Œ Pinterest wallpapersclan
πŸ“˜ Facebook wallpapersclan

All content on Wallpapers Clan is original or transformative fan art, intended for personal, non-commercial use. All trademarks and characters belong to their respective owners. Wallpapers Clan is not affiliated with or endorsed by any brands.

🀝 Contributing

Ideas, issues, and pull requests welcome!

git clone https://github.com/xi-Rick/icon-maker.git
cd icon-maker
# Hack away

Things to improve

  • Add more curated name mappings
  • Support for --dry-run mode (preview without downloading)
  • Handle animated PNG/APNG

🎨 Give your Linux desktop the style it deserves!

Made with 🩷 β€” icons by the W-Clan for the Linux community!

About

A script to download and create Linux icon packs

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages