Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap applications #146

Merged
merged 2 commits into from
May 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions extra/genentries
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ done

globalappfolder=/usr/share/applications
localappfolder=$user_home/.local/share/applications
snapappfolder=/var/lib/snapd/desktop/applications
pixmaps=/usr/share/pixmaps

if [ -z "$icontheme" ]; then
Expand Down Expand Up @@ -244,19 +245,8 @@ if ! [ -z "$icontheme" ]; then
# Set for in separator to newline
IFS=$'\n'

# Iterate over files in localappfolder and add them to the array
files=$(find -L "$localappfolder" -name "*.desktop" 2>/dev/null)
for desktopfile in $files
do
bname=$(basename "$desktopfile")
entry=$(readdesktopfile "$desktopfile")
if ! [ -z "$entry" ]; then
applications["$bname"]="$entry"
fi
done

# Iterate over files in globalappfolder and add them to the array if they don't already exists
files=$(find -L "$globalappfolder" -name "*.desktop" 2>/dev/null)
# Iterate over desktop files and add them to the array if they don't already exist
files=$(find -L "$localappfolder" "$globalappfolder" "$snapappfolder" -name "*.desktop" 2>/dev/null)
for desktopfile in $files
do
bname=$(basename "$desktopfile")
Expand Down