{{- if eq .host.distro.family "linux" -}} #!/usr/bin/env bash {{ $removeShortcuts := splitList " " .removeLinuxShortcuts }} # shortcuts to remove: {{ $removeShortcuts }} ### Remove unnecessary desktop shortcuts for DESKTOP_ICON in {{ $removeShortcuts }}; do for SHORTCUT_FOLDER in {{ .host.home }}/.local/share/applications {{ .host.home }}/.local/share/applications/wine/Programs; do if [ -f "$SHORTCUT_FOLDER/$DESKTOP_ICON" ]; then rm -f "$SHORTCUT_FOLDER/$DESKTOP_ICON" fi done for SHORTCUT_FOLDER in /usr/share/applications /usr/local/share/applications /var/lib/snapd/desktop/applications; do if [ -f "$SHORTCUT_FOLDER/$DESKTOP_ICON" ]; then sudo rm -f "$SHORTCUT_FOLDER/$DESKTOP_ICON" fi done done {{- end -}}