install.fairie/home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.sh.tmpl
Brian Zalewski 0ce5a3c77b Update 21 files
- /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_95-bootstrap-zsh-plugins.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_99-restart-gnome.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-node-version.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_95-bootstrap-zsh-plugins.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_98-cleanup.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_99-restart-gnome.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-install-go.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-node-version.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.sh.tmpl
2023-04-12 03:57:02 +00:00

26 lines
1.1 KiB
Cheetah

{{- if eq .host.distro.family "linux" -}}
#!/usr/bin/env bash
# @file Linux Shortcut Removal
# @brief Cleans up desktop shortcuts that are out of place or unwanted on Linux devices
# @description
# This script loops through the `.removeLinuxShortcuts` value in `home/.chezmoidata.yaml` and removes
# desktop shortcuts that have been deemed to be unnecessary or obtrusive.
{{ $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 -}}