2024-06-03 22:40:52 +02:00
|
|
|
#!/usr/bin/env bash
|
2023-12-08 17:33:11 +01:00
|
|
|
# jeremystartm's dotfiles "installer"
|
2023-12-08 17:38:01 +01:00
|
|
|
|
2023-12-09 15:46:02 +01:00
|
|
|
if [ ! -f "$HOME/.config/.jstm_dotfiles" ]; then
|
2024-06-03 20:10:39 +02:00
|
|
|
echo ":: Removing files"
|
|
|
|
./uninstall.sh &> /dev/null
|
2023-12-09 15:45:17 +01:00
|
|
|
fi
|
|
|
|
|
2024-06-02 20:49:23 +02:00
|
|
|
# utility function
|
2023-12-08 17:33:11 +01:00
|
|
|
function link() {
|
2024-06-03 20:10:39 +02:00
|
|
|
if [ -a "${HOME}/${2}" ]; then
|
|
|
|
[[ -n "$VERBOSE_WARNING" ]] && echo ":: Warning: ${2} already exists."
|
|
|
|
else
|
|
|
|
echo ":: Linking ${1} -> ${2}"
|
|
|
|
ln -s "$(pwd)/${1}" "${HOME}/${2}"
|
|
|
|
fi
|
2023-12-08 17:33:11 +01:00
|
|
|
}
|
|
|
|
|
2023-12-08 18:47:34 +01:00
|
|
|
# update/clone repositories
|
2024-06-03 01:55:54 +02:00
|
|
|
[[ ! -d "repositories/punktdateien-bashrc" ]] && git clone "https://git.staropensource.de/JeremyStarTM/punktdateien-bashrc.git" repositories/punktdateien-bashrc
|
|
|
|
(
|
2024-06-03 20:10:39 +02:00
|
|
|
cd repositories/punktdateien-bashrc || (
|
|
|
|
echo ":: Error: Can't cd into repositories/punktdateien-bashrc"
|
|
|
|
exit 1
|
|
|
|
)
|
|
|
|
git pull
|
2024-06-03 01:55:54 +02:00
|
|
|
)
|
|
|
|
|
2024-06-02 22:07:49 +02:00
|
|
|
[[ ! -d "repositories/dracula-mc" ]] && git clone "https://github.com/dracula/midnight-commander.git" repositories/dracula-mc
|
2024-06-02 20:49:23 +02:00
|
|
|
(
|
2024-06-03 20:10:39 +02:00
|
|
|
cd repositories/dracula-mc || (
|
|
|
|
echo ":: Error: Can't cd into repositories/dracula-mc"
|
|
|
|
exit 1
|
|
|
|
)
|
|
|
|
git pull
|
2024-06-02 20:49:23 +02:00
|
|
|
)
|
|
|
|
|
2023-12-08 17:38:01 +01:00
|
|
|
# create directories
|
2024-06-02 22:19:34 +02:00
|
|
|
mkdir -p "${HOME}/.local/share/mc/skins" "${HOME}/.local/bin" "${HOME}/.config/xdg-desktop-portal" "/home/jeremystartm/.config/GIMP/2.10"
|
2023-12-08 17:38:01 +01:00
|
|
|
|
2024-06-02 22:19:34 +02:00
|
|
|
# repositories
|
|
|
|
link "repositories/dracula-mc/skins/dracula.ini" ".local/share/mc/skins/dracula.ini"
|
|
|
|
link "repositories/dracula-mc/skins/dracula256.ini" ".local/share/mc/skins/dracula256.ini"
|
2024-06-02 22:07:49 +02:00
|
|
|
|
2024-06-02 22:19:34 +02:00
|
|
|
# bash
|
|
|
|
link "bash/bashrc" ".bashrc"
|
2024-06-03 01:55:54 +02:00
|
|
|
link "repositories/punktdateien-bashrc" ".bashrc.d"
|
2024-06-02 22:19:34 +02:00
|
|
|
link "bash/bin/launch-menu" ".local/bin/launch-menu"
|
2024-06-03 22:41:10 +02:00
|
|
|
link "bash/bin/launch-menu-apps" ".local/bin/launch-menu-apps"
|
2024-06-02 22:07:49 +02:00
|
|
|
link "bash/jobrunner/daemon.sh" ".local/bin/jobrunner"
|
|
|
|
link "bash/jobrunner/runjob.sh" ".local/bin/jobrunner-runjob"
|
|
|
|
link "bash/starship.toml" ".config/starship.toml"
|
2023-12-08 17:33:11 +01:00
|
|
|
|
|
|
|
# programs
|
2024-06-02 22:19:34 +02:00
|
|
|
link "programs/btop" ".config/btop"
|
|
|
|
link "programs/gitui" ".config/gitui"
|
|
|
|
link "programs/gimp/splashes" ".config/GIMP/2.10/splashes"
|
|
|
|
link "programs/konsole" ".local/share/konsole"
|
2024-06-02 22:07:49 +02:00
|
|
|
link "programs/midnightcommander/config" ".config/mc"
|
2024-06-02 22:19:34 +02:00
|
|
|
link "programs/midnightcommander/share" ".local/share/mc"
|
|
|
|
link "programs/mpv" ".config/mpv"
|
2023-12-08 17:33:11 +01:00
|
|
|
|
2024-06-02 22:19:34 +02:00
|
|
|
# gui
|
|
|
|
link "gui/fnott" ".config/fnott"
|
|
|
|
link "gui/hypr" ".config/hypr"
|
|
|
|
link "gui/hypr/hyprland-portals.conf" ".config/xdg-desktop-portal/hyprland-portals.conf"
|
|
|
|
link "gui/waybar" ".config/waybar"
|
2023-12-09 14:20:24 +01:00
|
|
|
|
2024-06-02 22:07:49 +02:00
|
|
|
link "gui/kde/aurorae" ".local/share/aurorae"
|
2024-06-02 22:19:34 +02:00
|
|
|
link "gui/kde/color-schemes" ".local/share/color-schemes"
|
|
|
|
link "gui/kde/kdedefaults" ".config/kdedefaults"
|
|
|
|
link "gui/kde/plasma" ".local/share/plasma"
|
|
|
|
link "gui/kde/rcfiles/dolphinrc" ".config/dolphinrc"
|
2024-06-02 22:07:49 +02:00
|
|
|
link "gui/kde/rcfiles/kglobalshortcutsrc" ".config/kglobalshortcutsrc"
|
|
|
|
link "gui/kde/rcfiles/kiorc" ".config/kiorc"
|
2024-06-02 22:19:34 +02:00
|
|
|
link "gui/kde/rcfiles/konsolerc" ".config/konsolerc"
|
2024-06-02 22:07:49 +02:00
|
|
|
link "gui/kde/rcfiles/krunnerrc" ".config/krunnerrc"
|
|
|
|
link "gui/kde/rcfiles/kservicemenurc" ".config/kservicemenurc"
|
|
|
|
link "gui/kde/rcfiles/ksplashrc" ".config/ksplashrc"
|
|
|
|
link "gui/kde/rcfiles/ktimezonedrc" ".config/ktimezonedrc"
|
|
|
|
link "gui/kde/rcfiles/plasma-localerc" ".config/plasma-localrc"
|
|
|
|
link "gui/kde/rcfiles/plasma-org.kde.plasma.desktop-appletsrc" ".config/plasma-org.kde.plasma.desktop-appletsrc"
|
2024-02-14 21:14:16 +01:00
|
|
|
|
2024-06-02 22:19:34 +02:00
|
|
|
# theming
|
|
|
|
link "theming/cursors" ".icons"
|
2024-06-03 19:56:22 +02:00
|
|
|
link "theming/cursors" ".themes"
|
2024-06-02 22:19:34 +02:00
|
|
|
link "theming/fonts" ".fonts"
|
|
|
|
link "theming/fontconfig" ".config/fontconfig"
|
|
|
|
link "theming/icons" ".local/share/icons"
|
|
|
|
link "theming/kvantum" ".config/Kvantum"
|
|
|
|
link "theming/neofetch" ".config/neofetch"
|
|
|
|
link "theming/nwg-look" ".config/nwg-look"
|
|
|
|
link "theming/qt5ct" ".config/qt5ct"
|
|
|
|
link "theming/qt6ct" ".config/qt6ct"
|
|
|
|
link "theming/wallpapers" ".local/share/wallpapers"
|
2023-12-09 14:23:07 +01:00
|
|
|
|
2023-12-13 19:32:24 +01:00
|
|
|
# punktdateien scripts
|
2024-06-02 22:19:34 +02:00
|
|
|
link "bin/install-software" ".local/bin/dotfiles-install-software"
|
2023-12-13 19:32:24 +01:00
|
|
|
link "bin/updatechecker" ".local/bin/dotfiles-updatechecker"
|
2023-12-13 20:03:46 +01:00
|
|
|
link "bin/updater" ".local/bin/dotfiles-updater"
|
2023-12-13 19:32:24 +01:00
|
|
|
|
2023-12-09 15:45:17 +01:00
|
|
|
# write install file
|
|
|
|
echo "pls don't remove" > "$HOME/.config/.jstm_dotfiles"
|