2019-04-16 16:33:57 +00:00
|
|
|
#!/bin/bash
|
2019-09-17 01:42:08 +00:00
|
|
|
[ ! -f "$HOME/.bashrc" ] && touch "$HOME/.bashrc";
|
|
|
|
[ ! -f "$HOME/.vimrc" ] && touch "$HOME/.vimrc";
|
|
|
|
|
2020-01-08 19:40:53 +00:00
|
|
|
[ ! -d "$HOME/.config" ] && mkdir "$HOME/.config";
|
|
|
|
[ ! -d "$HOME/.config/wryn" ] && mkdir "$HOME/.config/wryn";
|
|
|
|
|
|
|
|
# Source RCs
|
2019-09-17 01:42:08 +00:00
|
|
|
grep '.wryn' $HOME/.bashrc >/dev/null 2>/dev/null \
|
|
|
|
&& echo already set up bash rc \
|
2020-01-08 19:40:53 +00:00
|
|
|
|| echo source $HOME/.wryn/bash/rc >> $HOME/.bashrc;
|
2019-09-17 01:42:08 +00:00
|
|
|
|
|
|
|
grep '.wryn' $HOME/.vimrc >/dev/null 2>/dev/null \
|
|
|
|
&& echo already set up vim rc \
|
2020-01-08 19:40:53 +00:00
|
|
|
|| echo source $HOME/.wryn/vim/rc.vim >> $HOME/.vimrc;
|
2019-09-17 01:42:08 +00:00
|
|
|
|
2019-12-02 17:16:05 +00:00
|
|
|
grep '.wryn' $HOME/.zshrc >/dev/null 2>/dev/null \
|
|
|
|
&& echo already set up zsh rc \
|
2020-01-08 19:40:53 +00:00
|
|
|
|| echo source $HOME/.wryn/zsh/rc >> $HOME/.zshrc;
|
|
|
|
|
|
|
|
|
|
|
|
# setup local environments
|
|
|
|
which sh >/dev/null && "$HOME/.wryn/env/env.sh";
|
|
|
|
which bash >/dev/null && "$HOME/.wryn/env/env.bash";
|
|
|
|
which zsh >/dev/null && "$HOME/.wryn/env/env.zsh";
|
|
|
|
|
|
|
|
LOCAL_VIM_ENV="$HOME/.config/wryn/env.vim"
|
|
|
|
[ ! -f "$LOCAL_VIM_ENV" ] \
|
|
|
|
&& {
|
|
|
|
touch "$LOCAL_VIM_ENV";
|
|
|
|
which google-chrome-stable \
|
|
|
|
&& echo 'let $WEBBROWSER="'$(which google-chrome-stable)'"' >> $LOCAL_VIM_ENV\
|
|
|
|
|| echo 'let $WEBBROWSER=""' >> $LOCAL_VIM_ENV;
|
|
|
|
|
|
|
|
} || {
|
2020-01-08 20:04:01 +00:00
|
|
|
echo 'vim environment variables already set up';
|
2020-01-08 19:40:53 +00:00
|
|
|
}
|
2019-12-02 17:16:05 +00:00
|
|
|
|
2020-01-08 20:04:01 +00:00
|
|
|
|
|
|
|
# setup config symlinks
|
2020-01-10 16:04:45 +00:00
|
|
|
[ -f "$HOME/.tmux.conf" ] && mv "$HOME/.tmux.conf" "$HOME/.tmux.conf.bak";
|
|
|
|
ln -s "$HOME/.wryn/tmux/tmux.conf" "$HOME/.tmux.conf";
|
|
|
|
|
2020-01-08 20:04:01 +00:00
|
|
|
xfce4-panel --version >/dev/null 2>&1 \
|
|
|
|
&& [ ! -f "$HOME/.xinitrc" ] \
|
|
|
|
&& ln -s "$HOME/.wryn/config/xserver/xinitrc" "$HOME/.xinitrc";
|
|
|
|
|
|
|
|
function SYMLINK_CONFIG() {
|
|
|
|
# $1 = config directory name
|
|
|
|
# $2 = filename
|
|
|
|
[ ! -d "$HOME/.config/$1" ] && mkdir "$HOME/.config/$1";
|
|
|
|
[ -f "$HOME/.config/$1/$2" ] && mv "$HOME/.config/$1/$2" "$HOME/.config/$1/$2.bak";
|
|
|
|
ln -s "$HOME/.wryn/config/$1/$2" "$HOME/.config/$1/$2";
|
|
|
|
}
|
|
|
|
|
|
|
|
SYMLINK_CONFIG "compton" "compton.conf";
|
|
|
|
SYMLINK_CONFIG "i3" "config";
|
2020-01-08 20:11:56 +00:00
|
|
|
SYMLINK_CONFIG "kitty" "kitty.conf";
|
|
|
|
SYMLINK_CONFIG "kitty" "theme.conf";
|