dotfiles/set-links.sh
c47 81b13f4bd7 Add mpdconf and ncmpcpp config-dir
Added mpdconf. This file contains an include of ~/.mpdconf.local
which contains the listen directive.

Added a basic ncmpcpp config - mostly because a few keybindings
for daily usage that I really got used to.
2024-01-21 13:04:00 +01:00

54 lines
1 KiB
Bash

#!/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
# Bash
for config in ${WORKING_DIR}/bash/*; do
file=$(basename ${config})
if [[ ! -L ${HOME}/${file} ]]; then
ln -s ${config} .${file} 2>/dev/null
fi
done
# Gitconfig
if [[ ! -L ${HOME}/.gitconfig ]]; then
ln -s ${WORKING_DIR}/gitconfig .gitconfig 2>/dev/null
fi
# 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
# Neovim
if [[ ! -L ${CONFIG_DIR}/nvim ]]; then
ln -s ${WORKING_DIR}/nvim/ ${CONFIG_DIR}/nvim 2>/dev/null
fi
# Tmux
if [[ ! -L ${HOME}/.tmux.conf ]]; then
ln -s ${WORKING_DIR}/tmux/tmux.conf .tmux.conf 2>/dev/null
fi
# XsessionRC
if [[ ! -L ${HOME}/.xsessionrc ]]; then
ln -s ${WORKING_DIR}/xsessionrc .xsessionrc 2>/dev/null
fi