AvengeMedia / AvengeMedia/DankMaterialShell
file icon change based on maguten color
- Dominant language
- QML
- Stars
- 8.1k
- Forks
- 515
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 102
Description
### Feature Description
file icon change based on maguten color. bg changes but not the icon. that would look nice. DMS setting-> folders are looking good(based on matugen color). But on actual file manager no color icon. You can use papirus
### Use Case
_No response_
### Compositor(s)
Hyprland
### If Other, please specify
_No response_
### Proposed Solution
_No response_
### Alternatives/Existing Solutions
I used this manual script to get the closet color matching my theme.
#!/usr/bin/env bash
# Full path to papirus-folders in case PATH is missing in post_hook
PAPIRUS_FOLDERS="/usr/bin/papirus-folders"
# Read hex from matugen output
hex=$(<"$HOME/.config/matugen/papirus-folders/folder-color.txt")
hex="${hex#\#}" # strip # if present
# ── Color map — many reference points per papirus color for better matching ──
declare -A colors=(
# blacks / very dark
["black"]="#1a1a1a"
# whites / very light
["white"]="#f5f5f5"
# greys
["grey"]="#9e9e9e"
["bluegrey"]="#78909c"
# reds
["red"]="#f44336"
["red2"]="#e53935"
["red3"]="#c62828"
["red4"]="#ff1744"
["red5"]="#b71c1c"
# deep orange / orange-red
["deeporange"]="#ff5722"
["deeporange2"]="#f4511e"
["deeporange3"]="#bf360c"
["deeporange4"]="#ff6e40"
# orange
["orange"]="#ff9800"
["orange2"]="#fb8c00"
["orange3"]="#ef6c00"
["orange4"]="#ff6d00"
# pale orange / amber
["paleorange"]="#ffb74d"
["paleorange2"]="#ffa726"
["paleorange3"]="#ffcc02"
["paleorange4"]="#ffd54f"
# yellow
["yellow"]="#ffeb3b"
["yellow2"]="#fdd835"
["yellow3"]="#f9a825"
["yellow4"]="#ffee58"
# green
["green"]="#4caf50"
["green2"]="#43a047"
["green3"]="#2e7d32"
["green4"]="#00e676"
["green5"]="#1b5e20"
# teal
["teal"]="#009688"
["teal2"]="#00897b"
["teal3"]="#004d40"
["teal4"]="#1de9b6"
# cyan
["cyan"]="#00bcd4"
["cyan2"]="#00acc1"
["cyan3"]="#006064"
["cyan4"]="#18ffff"
# blue
["blue"]="#1a73e8"
["blue2"]="#1e88e5"
["blue3"]="#1565c0"
["blue4"]="#2979ff"
["blue5"]="#0d47a1"
# breeze / light blue
["breeze"]="#4d8ecb"
["breeze2"]="#29b6f6"
["breeze3"]="#039be5"
["breeze4"]="#0288d1"
# nordic / muted blue
["nordic"]="#5e81ac"
["nordic2"]="#4c72a0"
["nordic3"]="#3b5998"
# indigo / deep blue-purple
["indigo"]="#3f51b5"
["indigo2"]="#3949ab"
["indigo3"]="#1a237e"
["indigo4"]="#536dfe"
# violet / purple
["violet"]="#9c27b0"
["violet2"]="#8e24aa"
["violet3"]="#4a148c"
["violet4"]="#aa00ff"
["violet5"]="#7b1fa2"
# magenta / pink-purple
["magenta"]="#e91e63"
["magenta2"]="#d81b60"
["magenta3"]="#880e4f"
["magenta4"]="#f50057"
# pink
["pink"]="#f48fb1"
["pink2"]="#f06292"
["pink3"]="#ec407a"
["pink4"]="#e91e63"
# brown
["brown"]="#795548"
["brown2"]="#6d4c41"
["brown3"]="#4e342e"
["brown4"]="#a1887f"
# pale brown
["palebrown"]="#a1887f"
["palebrown2"]="#bcaaa4"
["palebrown3"]="#d7ccc8"
)
# ── Map variant names back to real papirus color names ──
declare -A color_name_map=(
["black"]="black"
["white"]="white"
["grey"]="grey"
["bluegrey"]="bluegrey"
["red"]="red" ["red2"]="red" ["red3"]="red" ["red4"]="red" ["red5"]="red"
["deeporange"]="deeporange" ["deeporange2"]="deeporange" ["deeporange3"]="deeporange" ["deeporange4"]="deeporange"
["orange"]="orange" ["orange2"]="orange" ["orange3"]="orange" ["orange4"]="orange"
["paleorange"]="paleorange" ["paleorange2"]="paleorange" ["paleorange3"]="paleorange" ["paleorange4"]="paleorange"
["yellow"]="yellow" ["yellow2"]="yellow" ["yellow3"]="yellow" ["yellow4"]="yellow"
["green"]="green" ["green2"]="green" ["green3"]="green" ["green4"]="green" ["green5"]="green"
["teal"]="teal" ["teal2"]="teal" ["teal3"]="teal" ["teal4"]="teal"
["cyan"]="cyan" ["cyan2"]="cyan" ["cyan3"]="cyan" ["cyan4"]="cyan"
["blue"]="blue" ["blue2"]="blue" ["blue3"]="blue" ["blue4"]="blue" ["blue5"]="blue"
["breeze"]="breeze" ["breeze2"]="breeze" ["breeze3"]="breeze" ["breeze4"]="breeze"
["nordic"]="nordic" ["nordic2"]="nordic" ["nordic3"]="nordic"
["indigo"]="indigo" ["indigo2"]="indigo" ["indigo3"]="indigo" ["indigo4"]="indigo"
["violet"]="violet" ["violet2"]="violet" ["violet3"]="violet" ["violet4"]="violet" ["violet5"]="violet"
["magenta"]="magenta" ["magenta2"]="magenta" ["magenta3"]="magenta" ["magenta4"]="magenta"
["pink"]="pink" ["pink2"]="pink" ["pink3"]="pink" ["pink4"]="pink"
["brown"]="brown" ["brown2"]="brown" ["brown3"]="brown" ["brown4"]="brown"
["palebrown"]="palebrown" ["palebrown2"]="palebrown" ["palebrown3"]="palebrown"
)
# ── Convert hex to RGB ──
hex_to_rgb() {
local h="${1#\#}"
echo "$((16#${h:0:2})) $((16#${h:2:2})) $((16#${h:4:2}))"
}
read r1 g1 b1 <<< "$(hex_to_rgb "$hex")"
# ── Find closest color ──
min_distance=1000000
closest_key=""
for key in "${!colors[@]}"; do
read r2 g2 b2 <<< "$(hex_to_rgb "${colors[$key]}")"
dist=$(( (r1-r2)*(r1-r2) + (g1-g2)*(g1-g2) + (b1-b2)*(b1-b2) ))
if (( dist < min_distance )); then
min_distance=$dist
closest_key=$key
fi
done
closest_color="${color_name_map[$closest_key]}"
echo "Matugen primary: #$hex → matched key: $closest_key → papirus color: $closest_color"
# ── Apply ──
"$PAPIRUS_FOLDERS" -C "$closest_color" --theme Papirus-Dark
# ── Refresh icon cache ──
gtk-update-icon-cache "$HOME/.local/share/icons/Papirus-Dark" 2>/dev/null || true
# gtk-update-icon-cache /usr/share/icons/Papirus-Dark 2>/dev/null || true
Contributor guide
Research direction
Start by reviewing the manual Bash script in the issue, including its Matugen color mapping, Papirus folder-color command, and icon-cache refresh. Identify the project entry point responsible for file-manager or icon-theme integration, then verify that actual file icons follow the Matugen color while folder icons continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100