punktdateien/install.sh

115 lines
3.9 KiB
Bash
Raw Normal View History

2023-12-08 17:33:11 +01:00
#!/bin/bash
# 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
2023-12-09 15:45:17 +01:00
echo ":: Removing files"
./uninstall.sh &> /dev/null
fi
2024-06-02 20:49:23 +02:00
# utility function
2023-12-08 17:33:11 +01:00
function link() {
if [ -a "${HOME}/${2}" ]; then
[[ -n "$VERBOSE_WARNING" ]] && echo ":: Warning: ${2} already exists."
else
echo ":: Linking ${2}"
ln -s "$(pwd)/${1}" "${HOME}/${2}"
fi
}
2023-12-08 18:47:34 +01:00
# update/clone repositories
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-02 22:07:49 +02:00
cd repositories/dracula-mc || (
echo ":: Error: Can't cd into repositories/dracula-mc"
2024-06-02 21:10:32 +02:00
exit 1
)
2023-12-08 18:47:34 +01:00
git pull
2024-06-02 20:49:23 +02:00
)
2024-06-02 22:07:49 +02:00
[[ ! -d "repositories/jstmbash" ]] && git clone "https://git.staropensource.de/JeremyStarTM/jstmbash.git" repositories/jstmbash
2024-06-02 20:49:23 +02:00
(
2024-06-02 22:07:49 +02:00
cd repositories/jstmbash || (
echo ":: Error: Can't cd into repositories/jstmbash"
2024-06-02 21:10:32 +02:00
exit 1
)
2023-12-08 18:47:34 +01:00
git pull
2024-06-02 20:49:23 +02:00
)
2023-12-08 17:33:11 +01: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"
link "repositories/jstmbash" ".jstmbash"
2024-06-02 22:07:49 +02:00
2024-06-02 22:19:34 +02:00
# bash
link "bash/bashrc" ".bashrc"
link "bash/bashrc.d" ".bashrc.d"
2024-06-02 22:19:34 +02:00
link "bash/bin/launch-menu" ".local/bin/launch-menu"
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/jstmbash.config.env" ".config/jstmbash.env"
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"
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"
2023-12-09 14:23:07 +01:00
# check for executables
if ! which qt5ct &> /dev/null; then
echo ":: Warning: qt5ct is not in your PATH."
fi
if ! which qt6ct &> /dev/null; then
echo ":: Warning: qt6ct is not in your PATH."
fi
if ! which nwg-look &> /dev/null; then
echo ":: Warning: nwg-look is not in your PATH."
fi