2023-12-09 14:52:39 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# jeremystartm's dotfiles "installer"
|
|
|
|
|
2024-06-02 22:03:40 +02:00
|
|
|
FORCED_UNLINKING=
|
|
|
|
|
2024-06-02 20:49:23 +02:00
|
|
|
# utility function
|
2023-12-09 14:52:39 +01:00
|
|
|
function unlink() {
|
2024-06-02 22:03:40 +02:00
|
|
|
if [ -a "${HOME}/${*}" ] || [ -n "${FORCED_UNLINKING}" ]; then
|
2023-12-09 14:52:39 +01:00
|
|
|
echo ":: Unlinking ${1}"
|
2024-06-02 21:48:17 +02:00
|
|
|
rm -rf "${HOME:?}/${*:?}"
|
2023-12-09 14:52:39 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2023-12-09 14:53:41 +01:00
|
|
|
# repositories
|
2024-06-03 02:01:27 +02:00
|
|
|
[[ -n "$REMOVE_REPOSITORIES" ]] && rm -rf repositories
|
2023-12-09 14:53:41 +01:00
|
|
|
|
2023-12-09 15:47:41 +01:00
|
|
|
# install bit
|
|
|
|
[[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "$HOME/.config/.jstm_dotfiles"
|
|
|
|
|
2024-06-02 21:16:17 +02:00
|
|
|
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"
|
2024-06-02 21:33:56 +02:00
|
|
|
".config/plasma-org.kde.plasma.desktop-appletsrc"
|
2024-06-02 21:16:17 +02:00
|
|
|
".config/konsolerc"
|
|
|
|
".local/share/konsole"
|
|
|
|
".config/dolphinrc"
|
|
|
|
".local/bin/dotfiles-updatechecker"
|
|
|
|
".local/bin/dotfiles-updater"
|
|
|
|
".local/bin/dotfiles-install-software"
|
2024-06-02 22:10:48 +02:00
|
|
|
".local/bin/launch-menu"
|
2024-06-02 21:16:17 +02:00
|
|
|
".config/copyq"
|
|
|
|
)
|
|
|
|
|
|
|
|
for path in "${legacypaths[@]}"; do
|
2024-06-02 22:03:40 +02:00
|
|
|
FORCED_UNLINKING=y unlink "${path}"
|
2024-06-02 21:16:17 +02:00
|
|
|
done
|
|
|
|
|
2024-06-02 22:03:40 +02:00
|
|
|
rm -rf "jstmbash" "dracula-mc"
|
|
|
|
|
2024-06-02 21:16:17 +02:00
|
|
|
echo ":: Unlinked legacy paths"
|
2024-06-03 01:55:54 +02:00
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
"--remove-unshared-bashrcd")
|
|
|
|
echo ":: Removing unshared bashrc.d"
|
|
|
|
FORCED_UNLINKING=y unlink ".bashrc.d"
|
|
|
|
exit 0
|
2024-06-02 21:16:17 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo ":: Warning: Unknown argument \"${arg}\""
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2024-06-02 22:19:34 +02:00
|
|
|
# repositories
|
|
|
|
unlink ".local/share/mc/skins/dracula.ini"
|
|
|
|
unlink ".local/share/mc/skins/dracula256.ini"
|
|
|
|
|
|
|
|
# bash
|
|
|
|
unlink ".bashrc"
|
|
|
|
unlink ".local/bin/launch-menu"
|
2023-12-09 14:52:39 +01:00
|
|
|
unlink ".local/bin/jobrunner"
|
|
|
|
unlink ".local/bin/jobrunner-runjob"
|
|
|
|
unlink ".config/jstmbash.env"
|
|
|
|
unlink ".config/starship.toml"
|
|
|
|
|
|
|
|
# programs
|
|
|
|
unlink ".config/btop"
|
2024-06-02 22:19:34 +02:00
|
|
|
unlink ".config/gitui"
|
|
|
|
unlink ".config/GIMP/2.10/splashes"
|
|
|
|
unlink ".local/share/konsole"
|
2023-12-09 14:52:39 +01:00
|
|
|
unlink ".config/mc"
|
2024-06-02 22:19:34 +02:00
|
|
|
unlink ".local/share/mc"
|
2023-12-09 14:52:39 +01:00
|
|
|
unlink ".config/mpv"
|
|
|
|
|
2024-06-02 22:19:34 +02:00
|
|
|
# gui
|
|
|
|
unlink ".config/fnott"
|
|
|
|
unlink ".config/hypr"
|
|
|
|
unlink ".config/xdg-desktop-portal/hyprland-portals.conf"
|
|
|
|
unlink ".config/waybar"
|
2023-12-09 14:52:39 +01:00
|
|
|
|
2024-03-30 00:33:47 +01:00
|
|
|
unlink ".local/share/aurorae"
|
2024-06-02 22:19:34 +02:00
|
|
|
unlink ".local/share/color-schemes"
|
|
|
|
unlink ".config/kdedefaults"
|
|
|
|
unlink ".local/share/plasma"
|
|
|
|
unlink ".config/dolphinrc"
|
2024-02-14 21:14:16 +01:00
|
|
|
unlink ".config/kglobalshortcutsrc"
|
|
|
|
unlink ".config/kiorc"
|
2024-06-02 22:19:34 +02:00
|
|
|
unlink ".config/konsolerc"
|
2024-02-14 21:14:16 +01:00
|
|
|
unlink ".config/krunnerrc"
|
|
|
|
unlink ".config/kservicemenurc"
|
|
|
|
unlink ".config/ksplashrc"
|
|
|
|
unlink ".config/ktimezonedrc"
|
|
|
|
unlink ".config/plasma-localrc"
|
|
|
|
unlink ".config/plasma-org.kde.plasma.desktop-appletsrc"
|
|
|
|
|
2024-06-02 22:19:34 +02:00
|
|
|
# theming
|
|
|
|
unlink ".icons"
|
|
|
|
unlink ".fonts"
|
|
|
|
unlink ".config/fontconfig"
|
|
|
|
unlink ".local/share/icons"
|
|
|
|
unlink ".config/Kvantum"
|
|
|
|
unlink ".config/neofetch"
|
|
|
|
unlink ".config/nwg-look"
|
|
|
|
unlink ".config/qt5ct"
|
|
|
|
unlink ".config/qt6ct"
|
|
|
|
unlink ".local/share/wallpapers"
|
2023-12-13 19:32:24 +01:00
|
|
|
|
|
|
|
# punktdateien scripts
|
2024-06-02 22:19:34 +02:00
|
|
|
unlink ".local/bin/dotfiles-install-software"
|
2023-12-13 19:32:24 +01:00
|
|
|
unlink ".local/bin/dotfiles-updatechecker"
|
2023-12-13 20:03:46 +01:00
|
|
|
unlink ".local/bin/dotfiles-updater"
|
2024-06-02 17:15:51 +02:00
|
|
|
|
|
|
|
# legacy
|
|
|
|
unlink ".config/copyq"
|
2024-06-02 22:19:34 +02:00
|
|
|
unlink ".config/eww"
|
2024-06-03 01:18:50 +02:00
|
|
|
unlink ".jstmbash"
|
2024-06-03 01:19:29 +02:00
|
|
|
|
|
|
|
# legacy repositories
|
|
|
|
rm -rf "repositories/jstmbash"
|