151 lines
3.4 KiB
Bash
Executable file
151 lines
3.4 KiB
Bash
Executable file
#!/bin/bash
|
|
# jeremystartm's dotfiles "installer"
|
|
|
|
# utility function
|
|
function unlink() {
|
|
if [ -a "${HOME}/${1}" ]; then
|
|
echo ":: Unlinking ${1}"
|
|
rm -rf "${HOME:?}/${1:?}"
|
|
fi
|
|
}
|
|
|
|
# repositories
|
|
[[ -n "$REMOVE_REPOSITORIES" ]] && rm -rf "jstmbash" "dracula-mc"
|
|
|
|
# install bit
|
|
[[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "$HOME/.config/.jstm_dotfiles"
|
|
|
|
for arg in "${@}"; do
|
|
case "${arg}" in
|
|
"--remove-legacy-paths")
|
|
echo ":: Unlinking legacy paths"
|
|
|
|
declare -a legacypaths=(
|
|
".local/bin/jobrunner"
|
|
".local/bin/jobrunner-runjob"
|
|
".jstmbash"
|
|
".config/jstmbash.env"
|
|
".config/starship.toml"
|
|
".bashrc"
|
|
".config/hypr"
|
|
".config/waybar"
|
|
".config/fnott"
|
|
".config/eww"
|
|
".config/xdg-desktop-portal/hyprland-portals.conf"
|
|
".config/neofetch"
|
|
".config/btop"
|
|
".local/share/mc"
|
|
".config/mc"
|
|
".config/mpv"
|
|
".config/GIMP/2.10/splashes"
|
|
".config/gitui"
|
|
".local/share/mc/skins/dracula.ini"
|
|
".local/share/mc/skins/dracula256.ini"
|
|
".config/nwg-look"
|
|
".config/qt5ct"
|
|
".config/qt6ct"
|
|
".config/Kvantum"
|
|
".icons"
|
|
".local/share/icons"
|
|
".fonts"
|
|
".config/fontconfig"
|
|
".local/share/wallpapers"
|
|
".local/share/plasma"
|
|
".config/kdedefaults"
|
|
".local/share/color-schemes"
|
|
".local/share/aurorae"
|
|
".config/kglobalshortcutsrc"
|
|
".config/kiorc"
|
|
".config/krunnerrc"
|
|
".config/kservicemenurc"
|
|
".config/ksplashrc"
|
|
".config/ktimezonedrc"
|
|
".config/plasma-localrc"
|
|
".config/plasma-org.kde.plasma.deskop-appletsrc"
|
|
".config/konsolerc"
|
|
".local/share/konsole"
|
|
".config/dolphinrc"
|
|
".local/bin/dotfiles-updatechecker"
|
|
".local/bin/dotfiles-updater"
|
|
".local/bin/dotfiles-install-software"
|
|
".config/copyq"
|
|
)
|
|
|
|
for path in "${legacypaths[@]}"; do
|
|
unlink "${path}"
|
|
done
|
|
|
|
echo ":: Unlinked legacy paths"
|
|
exit 1
|
|
;;
|
|
*)
|
|
echo ":: Warning: Unknown argument \"${arg}\""
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# jobrunner
|
|
unlink ".local/bin/jobrunner"
|
|
unlink ".local/bin/jobrunner-runjob"
|
|
|
|
# bash configuration
|
|
unlink ".jstmbash"
|
|
unlink ".config/jstmbash.env"
|
|
unlink ".config/starship.toml"
|
|
unlink ".bashrc"
|
|
|
|
# wm/compositor
|
|
unlink ".config/hypr"
|
|
unlink ".config/waybar"
|
|
unlink ".config/fnott"
|
|
unlink ".config/eww"
|
|
unlink ".config/xdg-desktop-portal/hyprland-portals.conf"
|
|
|
|
# programs
|
|
unlink ".config/neofetch"
|
|
unlink ".config/btop"
|
|
unlink ".local/share/mc"
|
|
unlink ".config/mc"
|
|
unlink ".config/mpv"
|
|
unlink ".config/GIMP/2.10/splashes"
|
|
unlink ".config/gitui"
|
|
|
|
# theming
|
|
unlink ".local/share/mc/skins/dracula.ini"
|
|
unlink ".local/share/mc/skins/dracula256.ini"
|
|
unlink ".config/nwg-look"
|
|
unlink ".config/qt5ct"
|
|
unlink ".config/qt6ct"
|
|
unlink ".config/Kvantum"
|
|
unlink ".icons"
|
|
unlink ".local/share/icons"
|
|
unlink ".fonts"
|
|
unlink ".config/fontconfig"
|
|
unlink ".local/share/wallpapers"
|
|
|
|
# kde
|
|
unlink ".local/share/plasma"
|
|
unlink ".config/kdedefaults"
|
|
unlink ".local/share/color-schemes"
|
|
unlink ".local/share/aurorae"
|
|
unlink ".config/kglobalshortcutsrc"
|
|
unlink ".config/kiorc"
|
|
unlink ".config/krunnerrc"
|
|
unlink ".config/kservicemenurc"
|
|
unlink ".config/ksplashrc"
|
|
unlink ".config/ktimezonedrc"
|
|
unlink ".config/plasma-localrc"
|
|
unlink ".config/plasma-org.kde.plasma.desktop-appletsrc"
|
|
|
|
# programs
|
|
unlink ".config/konsolerc"
|
|
unlink ".local/share/konsole"
|
|
unlink ".config/dolphinrc"
|
|
|
|
# punktdateien scripts
|
|
unlink ".local/bin/dotfiles-updatechecker"
|
|
unlink ".local/bin/dotfiles-updater"
|
|
unlink ".local/bin/dotfiles-install-software"
|
|
|
|
# legacy
|
|
unlink ".config/copyq"
|