New backup 2025-11-28 10:45:02

This commit is contained in:
Penelope Gwen 2025-11-28 10:45:02 -08:00
parent 2e444508d2
commit b3dca76aa5

View file

@ -111,15 +111,22 @@ get_icon() {
}
[[ "$icon_name" ]] && {
icon_locations=(
icons/hicolor/scalable/apps
icons/hicolor/48x48/apps
icons/gnome/48x48/apps
icons/gnome/48x48/devices
pixmaps
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/gnome/48x48/apps
/usr/share/icons/gnome/48x48/devices
/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 s in .svg .png .xpm ""; do
icon=/usr/share/$d/$icon_name$s
icon=$d/$icon_name$s
[[ -r $icon ]] && {
echo "$icon"
[[ "$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" && -r "$icon" ]] && {
echo "$icon"