579e6de907
- /home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.tmpl
21 lines
786 B
Cheetah
21 lines
786 B
Cheetah
{{- if eq .host.distro.family "linux" -}}
|
|
#!/usr/bin/env bash
|
|
|
|
{{ $removeShortcuts := join " " .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 -}}
|