-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·84 lines (65 loc) · 1.8 KB
/
install
File metadata and controls
executable file
·84 lines (65 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env bash
# TODO:
# 1. rustup
# 2. cargo install bob
# 3. bob install and use a known neovim version
set -e
if [[ "${USER}" != "griwes" && "${USER}" != "mdominiak" && "${GRIWES_DOTFILES_DISREGARD_USERNAME}" -ne 1 ]]
then
echo "You are (probably) not griwes."
echo "Please take some time reading through this script to avoid surprises."
echo "Also remember to, at the very least, change the git config..."
exit 1
fi
do_which() {
if ! which $1 >/dev/null
then
echo "$1 not installed! Make sure you have: nvim, pip3, git, tmux, zsh."
exit 1
fi
}
do_which nvim
do_which pip3
do_which git
do_which tmux
do_which zsh
dot_dir=$(dirname $(readlink -f $BASH_SOURCE[0]))
set -x
echo Configuring git...
ln -sfn "${dot_dir}/git/config" ~/.gitconfig
echo Configuring i3...
if [[ -d ~/.config/i3 ]]
then
rm -rf ~/.config/i3
fi
ln -sfn "${dot_dir}/i3" ~/.config/i3
pip3 install --user i3-workspace-groups --break-system-packages
echo Configuring polybar...
ln -sfn "${dot_dir}/polybar" ~/.config/polybar
echo Configuring nvim...
ln -sfn "${dot_dir}/nvim" ~/.config/nvim
echo Configuring ssh...
ln -sfn "${dot_dir}/ssh/config" ~/.ssh/config
mkdir -p ~/.ssh/cm_sockets
echo Configuring kitty...
ln -sfn "${dot_dir}/kitty" ~/.config/kitty
echo Configuring tmux...
ln -sfn "${dot_dir}/tmux/tmux.conf" ~/.tmux.conf
ln -sfn "${dot_dir}/tmux" ~/.tmux
cd "${dot_dir}/tmux"
make tmux.conf
cd - >/dev/null
echo Configuring zsh...
ln -sfn "${dot_dir}/zsh/zshrc" ~/.zshrc
ln -sfn "${dot_dir}/zsh/p10k.zsh" ~/.p10k.zsh
if [ "$(cat /etc/passwd | grep ${USER} | awk -F':' '{ print $7 }')" != "$(which zsh)" ]
then
chsh -s $(which zsh)
fi
echo Installing fzf...
if [ ! -d ~/.fzf ]
then
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
fi
echo Setup complete.