New backup 2025-11-28 21:30:01
This commit is contained in:
parent
2b70a3907a
commit
1183711256
1 changed files with 13 additions and 7 deletions
|
|
@ -40,7 +40,7 @@ get_hardcoded_icon() {
|
|||
get_desktop() {
|
||||
app="$1"
|
||||
p="/usr/share/applications"
|
||||
f="/var/lib/flatpak/exports/share/applications"
|
||||
flist=("/var/lib/flatpak/exports/share/applications" "${HOME}/.local/share/flatpak/exports/share/applications")
|
||||
[[ "$verbose" ]] && echo "searching for '$app'" >&2
|
||||
|
||||
# fast and easy cases first:
|
||||
|
|
@ -75,12 +75,16 @@ get_desktop() {
|
|||
return
|
||||
}
|
||||
|
||||
d=$( $GREP -il "^startupwmclass=$app.*$" ${f}/*.desktop | head -n 1)
|
||||
[[ -r "$d" ]] && {
|
||||
echo "$d"
|
||||
[[ "$verbose" ]] && echo "found '$d'" >&2
|
||||
return
|
||||
}
|
||||
for f in ${flist[@]};do
|
||||
[[ "$verbose" ]] && echo "using '$GREP' to search in '${f}'" >&2
|
||||
d=$( $GREP -il "^startupwmclass=$app.*$" ${f}/* | head -n 1)
|
||||
[[ "$verbose" ]] && echo "found '$d'" >&2
|
||||
[[ -r "$d" ]] && {
|
||||
echo "$d"
|
||||
[[ "$verbose" ]] && echo "found '$d'" >&2
|
||||
return
|
||||
}
|
||||
done
|
||||
|
||||
# desperation - weird apps like com.github.wwmm.pulseeffects.desktop!!
|
||||
# shellcheck disable=SC2012
|
||||
|
|
@ -126,6 +130,8 @@ get_icon() {
|
|||
/usr/share/pixmaps
|
||||
/var/lib/flatpak/exports/share/icons/hicolor/scalable/apps
|
||||
/var/lib/flatpak/exports/share/icons/hicolor/48x48/apps
|
||||
"${HOME}/.local/share/flatpak/exports/share/icons/hicolor/scalable/apps"
|
||||
"${HOME}/.local/share/flatpak/exports/share/icons/hicolor/48x48/apps"
|
||||
# icons/hicolor/scalable/apps
|
||||
# icons/hicolor/48x48/apps
|
||||
# icons/gnome/48x48/apps
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue