81 lines
2.6 KiB
Bash
Executable file
81 lines
2.6 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# This scripts installs user configuration by linking it in your home
|
|
# directory. It goes a little further when needed.
|
|
|
|
[[ $PWD == /home/$USER/dotfiles ]] ||
|
|
echo "!!! WE'RE NOT IN >>>/home/$USER/dotfile/<<< !!!"
|
|
|
|
if [[ -z $1 ]]
|
|
then
|
|
echo "Usage: $(basename $0) <program name> "
|
|
echo " "
|
|
echo "Give a program name and it will install its configuration. There are "
|
|
echo "available configurations for: "
|
|
ls -d ~/dotfiles/*/
|
|
exit 0
|
|
fi
|
|
|
|
case $1 in
|
|
"emacs" )
|
|
echo "Installing emacs config"
|
|
git clone https://github.com/syl20bnr/spacemacs.git ~/.emacs.d
|
|
stow -v emacs
|
|
exit 0
|
|
;;
|
|
"scripts" )
|
|
stow -v scripts
|
|
exit 0
|
|
;;
|
|
"xmonad" )
|
|
stow -v xmonad
|
|
exit 0
|
|
;;
|
|
"vim" )
|
|
echo "Installing vim config"
|
|
stow -v vim
|
|
cd ~/.vim/bundle
|
|
# Fetch plugins
|
|
git clone git://github.com/ntpeters/vim-better-whitespace.git
|
|
git clone git://github.com/altercation/vim-colors-solarized.git
|
|
git clone git://github.com/tpope/vim-fugitive.git
|
|
vim -u NONE -c "helptags vim-fugitive/doc" -c q
|
|
git clone git://github.com/tpope/vim-obsession.git
|
|
vim -u NONE -c "helptags vim-obsession/doc" -c q
|
|
git clone git://github.com/tpope/vim-surround.git
|
|
vim -u NONE -c "helptags vim-surround/doc" -c q
|
|
git clone git://github.com/petRUShka/vim-opencl.git
|
|
git clone git://github.com/Matt-Deacalion/vim-systemd-syntax.git
|
|
git clone git://github.com/lervag/vimtex.git
|
|
git clone git://github.com/vim-voom/VOoM.git
|
|
exit 0
|
|
;;
|
|
"tmux" )
|
|
echo "Installing tmux config"
|
|
stow -v tmux
|
|
# Set up plugin manager
|
|
mkdir -p ~/.tmux/plugins
|
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
|
#tmux source ~/.tmux.conf
|
|
echo "On first tmux start, run 'prefix + I' to install modules"
|
|
exit 0
|
|
;;
|
|
"zsh" )
|
|
echo "Installing zsh config"
|
|
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
|
|
stow -v zsh
|
|
echo "You can add your local config in ~/.zsh-local-$HOST"
|
|
;;
|
|
"dircolors" )
|
|
echo "Installing dircolors config"
|
|
git clone https://github.com/seebi/dircolors-solarized ~/.dircolors
|
|
ln -s ~/.dircolors/dircolors.ansi-dark ~/.dir_colors
|
|
echo "Default dircolors theme is dark ansi"
|
|
echo "Please check that your terminal emulator is listed at the begining"
|
|
echo "of the file like so: TERM xterm-termite (for termite)"
|
|
;;
|
|
* )
|
|
echo "$1 cannot be installed…"
|
|
exit 1
|
|
;;
|
|
esac
|