2024-01-13 17:58:33 +01:00
|
|
|
#!/usr/bin/bash
|
|
|
|
|
|
|
|
# This saves the real path to the script
|
|
|
|
WORKING_DIR=$(dirname $(realpath ${0}))
|
|
|
|
|
|
|
|
# This saves $XDG_CONFIG_HOME or ~/.confg as CONFIG_DIR
|
|
|
|
CONFIG_DIR=${XDG_CONFIG_HOME:-${HOME}/.config}
|
|
|
|
|
|
|
|
cd
|
|
|
|
|
2024-01-14 11:18:24 +01:00
|
|
|
# Bash
|
2024-01-13 17:58:33 +01:00
|
|
|
for config in ${WORKING_DIR}/bash/*; do
|
|
|
|
|
|
|
|
file=$(basename ${config})
|
|
|
|
|
|
|
|
if [[ ! -L ${HOME}/${file} ]]; then
|
|
|
|
ln -s ${config} .${file} 2>/dev/null
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2024-02-19 06:38:02 +01:00
|
|
|
# Git
|
|
|
|
if [[ ! -L ${HOME}/.config/git ]]; then
|
|
|
|
ln -s ${WORKING_DIR}/git/ .config/git 2>/dev/null
|
2024-01-16 19:25:55 +01:00
|
|
|
fi
|
|
|
|
|
2024-01-13 17:58:33 +01:00
|
|
|
|
2024-01-21 13:04:00 +01:00
|
|
|
# Music Player Daemon
|
|
|
|
if [[ ! -L ${HOME}/.mpdconf ]]; then
|
|
|
|
ln -s ${WORKING_DIR}/mpdconf .mpdconf 2>/dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Ncmpcpp
|
|
|
|
if [[ ! -L ${CONFIG_DIR}/.ncmpcpp ]]; then
|
|
|
|
ln -s ${WORKING_DIR}/ncmpcpp/ ${CONFIG_DIR}/ncmpcpp 2>/dev/null
|
|
|
|
fi
|
|
|
|
|
2024-01-14 11:18:24 +01:00
|
|
|
# Neovim
|
2024-01-13 17:58:33 +01:00
|
|
|
if [[ ! -L ${CONFIG_DIR}/nvim ]]; then
|
|
|
|
ln -s ${WORKING_DIR}/nvim/ ${CONFIG_DIR}/nvim 2>/dev/null
|
|
|
|
fi
|
2024-01-13 19:18:38 +01:00
|
|
|
|
|
|
|
|
2024-01-14 11:18:24 +01:00
|
|
|
# Tmux
|
2024-03-09 18:45:29 +01:00
|
|
|
if [[ ! -L ${HOME}/.config/tmux/tmux.conf ]]; then
|
|
|
|
mkdir -m 0700 ${HOME}/.config/tmux
|
2024-01-13 19:18:38 +01:00
|
|
|
ln -s ${WORKING_DIR}/tmux/tmux.conf .tmux.conf 2>/dev/null
|
|
|
|
fi
|
2024-01-14 11:18:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
# XsessionRC
|
|
|
|
if [[ ! -L ${HOME}/.xsessionrc ]]; then
|
|
|
|
ln -s ${WORKING_DIR}/xsessionrc .xsessionrc 2>/dev/null
|
|
|
|
fi
|
2024-02-18 00:27:46 +01:00
|
|
|
|
|
|
|
# Zsh
|
|
|
|
if [[ ! -d ${HOME}/.zsh ]]; then
|
2024-03-09 18:45:29 +01:00
|
|
|
mkdir -m 0700 ~/.zsh 2>/dev/null
|
2024-02-18 00:27:46 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -L ${HOME}/.zshenv ]]; then
|
2024-02-19 06:43:40 +01:00
|
|
|
ln -s ${WORKING_DIR}/zsh/zshenv .zshenv 2>/dev/null
|
2024-02-18 00:27:46 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -L ${HOME}/.zshrc ]]; then
|
2024-02-19 06:43:40 +01:00
|
|
|
ln -s ${WORKING_DIR}/zsh/zshrc .zsh/.zshrc 2>/dev/null
|
2024-02-18 00:27:46 +01:00
|
|
|
fi
|
2024-02-19 06:55:50 +01:00
|
|
|
|
|
|
|
if [[ ! -L ${HOME}/.zsh/.zdirhashes ]]; then
|
|
|
|
ln -s ${WORKING_DIR}/zsh/zdirhashes .zsh/.zdirhashes 2>/dev/null
|
2024-02-19 11:59:15 +01:00
|
|
|
fi
|