New backup 2025-11-28 10:45:02
This commit is contained in:
parent
2e444508d2
commit
b3dca76aa5
1 changed files with 14 additions and 6 deletions
|
|
@ -111,15 +111,22 @@ get_icon() {
|
||||||
}
|
}
|
||||||
[[ "$icon_name" ]] && {
|
[[ "$icon_name" ]] && {
|
||||||
icon_locations=(
|
icon_locations=(
|
||||||
icons/hicolor/scalable/apps
|
/usr/share/icons/hicolor/scalable/apps
|
||||||
icons/hicolor/48x48/apps
|
/usr/share/icons/hicolor/48x48/apps
|
||||||
icons/gnome/48x48/apps
|
/usr/share/icons/gnome/48x48/apps
|
||||||
icons/gnome/48x48/devices
|
/usr/share/icons/gnome/48x48/devices
|
||||||
pixmaps
|
/usr/share/pixmaps
|
||||||
|
/var/lib/flatpak/exports/share/icons/hicolor/scalable/apps/
|
||||||
|
/var/lib/flatpak/exports/share/icons/hicolor/48x48/apps/
|
||||||
|
# icons/hicolor/scalable/apps
|
||||||
|
# icons/hicolor/48x48/apps
|
||||||
|
# icons/gnome/48x48/apps
|
||||||
|
# icons/gnome/48x48/devices
|
||||||
|
# pixmaps
|
||||||
)
|
)
|
||||||
for d in "${icon_locations[@]}"; do
|
for d in "${icon_locations[@]}"; do
|
||||||
for s in .svg .png .xpm ""; do
|
for s in .svg .png .xpm ""; do
|
||||||
icon=/usr/share/$d/$icon_name$s
|
icon=$d/$icon_name$s
|
||||||
[[ -r $icon ]] && {
|
[[ -r $icon ]] && {
|
||||||
echo "$icon"
|
echo "$icon"
|
||||||
[[ "$verbose" ]] && echo "using .desktop icon '$icon'" >&2
|
[[ "$verbose" ]] && echo "using .desktop icon '$icon'" >&2
|
||||||
|
|
@ -135,6 +142,7 @@ get_icon() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[[ "$verbose" ]] && echo "searching for '$app' icon" >&2
|
||||||
icon=$( find /usr/share/icons /usr/share/pixmaps | grep -E -i "/$app.(png|svg)" | head -n 1 )
|
icon=$( find /usr/share/icons /usr/share/pixmaps | grep -E -i "/$app.(png|svg)" | head -n 1 )
|
||||||
[[ "$icon" && -r "$icon" ]] && {
|
[[ "$icon" && -r "$icon" ]] && {
|
||||||
echo "$icon"
|
echo "$icon"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue