60 lines
1.6 KiB
Bash
60 lines
1.6 KiB
Bash
#!/bin/sh
|
|
|
|
## This script takes care of the i3 configuration
|
|
|
|
if [ -z "$BASE_DIR" ]; then
|
|
echo "BASE_DIR wasn't set."
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p ~/github_dotfiles
|
|
if [ -e ~/github_dotfiles/i3-starterpack ]; then
|
|
if [ "$UPDATE" = 'true' ]; then
|
|
cd ~/github_dotfiles/i3-starterpack && git pull
|
|
fi
|
|
else
|
|
cd ~/github_dotfiles && git clone https://github.com/addy-dclxvi/i3-starterpack.git
|
|
fi
|
|
if [ -e ~/github_dotfiles/i3blocks-contrib ]; then
|
|
if [ "$UPDATE" = 'true' ]; then
|
|
cd ~/github_dotfiles/i3blocks-contrib && git pull
|
|
fi
|
|
else
|
|
cd ~/github_dotfiles && git clone https://github.com/vivien/i3blocks-contrib.git
|
|
fi
|
|
|
|
# Add i3 main config {{{
|
|
|
|
echo "Adding i3/config"
|
|
mkdir -p ~/.config/i3
|
|
if [ ! -L ~/.config/i3/config ]; then
|
|
ln -rs "$BASE_DIR"/dotfiles/i3/i3_config ~/.config/i3/config 2> /dev/null
|
|
fi
|
|
|
|
# }}}
|
|
|
|
# Add i3status config {{{
|
|
|
|
echo "Adding i3status/config"
|
|
mkdir -p ~/.config/i3status
|
|
if [ ! -L ~/.config/i3status/config ]; then
|
|
ln -rs "$BASE_DIR"/dotfiles/i3/i3status_config ~/.config/i3status/config 2> /dev/null
|
|
fi
|
|
|
|
# }}}
|
|
|
|
# Add i3blocks config {{{
|
|
|
|
echo "Adding i3blocks/config"
|
|
mkdir -p ~/.config/i3blocks/scripts
|
|
if [ ! -L ~/.config/i3blocks/config ]; then
|
|
ln -rs "$BASE_DIR"/dotfiles/i3/i3blocks_config ~/.config/i3blocks/config 2> /dev/null
|
|
fi
|
|
if [ ! -L ~/.config/i3blocks/scripts/arch-update ]; then
|
|
ln -rs ~/github_dotfiles/i3blocks-contrib/arch-update/arch-update ~/.config/i3blocks/scripts/arch-update 2> /dev/null
|
|
fi
|
|
if [ ! -L ~/.config/i3blocks/scripts/rofi-calendar ]; then
|
|
ln -rs ~/github_dotfiles/i3blocks-contrib/rofi-calendar/rofi-calendar ~/.config/i3blocks/scripts/rofi-calendar 2> /dev/null
|
|
fi
|
|
|
|
# }}}
|