install.fairie/home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.tmpl
Brian Zalewski 7d0e87d9ea Update 5 files
- /home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl
- /home/.chezmoiscripts/ubuntu/run_onchange_before_10-install-ubuntu-dependencies.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.tmpl
- /home/.chezmoidata.yaml
2023-01-09 18:28:15 +00:00

21 lines
791 B
Cheetah

{{- 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 -}}