diff --git a/appmenus/convert_app2template.sh b/appmenus/convert_app2template.sh index 337b9d0..fc016b5 100755 --- a/appmenus/convert_app2template.sh +++ b/appmenus/convert_app2template.sh @@ -3,13 +3,14 @@ SRC=$1 DSTDIR=$2 DST=$DSTDIR/$(basename $SRC) -# Do not copy KDE/GNOME specific apps, e.g. "Home", "Find files", etc -if grep -q OnlyShowIn $SRC ; then +if ! grep -q ^Name $SRC ; then + echo "WARNING: app $SRC doesn't have Name keyword, skipping..." exit 0 fi -if ! grep -q ^Name $SRC ; then - echo "WARNING: app $SRC doesn't have Name keyword, skipping..." +# Skip all the appmenus not explicitly white-listed +DESKTOP_NAME=$(basename $SRC) +if ! grep -q ^$DESKTOP_NAME$ appmenus/whitelisted-appmenus.list ; then exit 0 fi @@ -20,6 +21,7 @@ sed -e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/" \ grep -v "^Mime" | \ grep -v "^Icon" | \ grep -v "^TryExec" | \ + grep -v "^OnlyShowIn" | \ grep -v "^Startup" >$DST echo X-Qubes-VmName=%VMNAME% >> $DST diff --git a/appmenus/convert_app2template_for_templatevm.sh b/appmenus/convert_app2template_for_templatevm.sh index 113cc3c..f9d98eb 100755 --- a/appmenus/convert_app2template_for_templatevm.sh +++ b/appmenus/convert_app2template_for_templatevm.sh @@ -9,6 +9,7 @@ sed -e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/" \ <$SRC | \ grep -v "^Mime" | \ grep -v "^TryExec" | \ + grep -v "^OnlyShowIn" | \ grep -v "^Startup" >$DST #echo "Categories=%VMNAME%" >> $DST diff --git a/appmenus/whitelisted-appmenus.list b/appmenus/whitelisted-appmenus.list new file mode 100644 index 0000000..ab42670 --- /dev/null +++ b/appmenus/whitelisted-appmenus.list @@ -0,0 +1,16 @@ +gnome-terminal.desktop +gnome-nautilus-home.desktop +dolphin.desktop +manage-print-jobs.desktop +mozilla-firefox.desktop +mozilla-thunderbird.desktop +openoffice.org-calc.desktop +openoffice.org-draw.desktop +openoffice.org-impress.desktop +openoffice.org-math.desktop +openoffice.org-writer.desktop +Kontact.desktop +kcalc.desktop +kwrite.desktop +ksysguard.desktop +fedora-keepassx.desktop