-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdotfiles-setup
More file actions
59 lines (46 loc) · 1.3 KB
/
dotfiles-setup
File metadata and controls
59 lines (46 loc) · 1.3 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
#!/bin/bash
#INCOMPLETE
#install tools
sudo apt -y install xsel ranger
#shellcheck disable=2164
pushd "$HOME"
mkdir ".vcs_dist"
git clone https://github.com/rupa/z.git ".vcs_dist/z"
mkdir "VcsSrc"
git clone https://github.com/nginx/nginx.git "VcsSrc/nginx"
mkdir ".vim"
cp -r "VcsSrc/nginx/contrib/vim/"* ".vim"
cut -c 3- >> ".vim/vimrc" <<- 'VIMRC'
TODO:
- vimrc from EC2
- indent/nginx.vim from dotfiles
- ls_colors
VIMRC
cut -c 3- >> ".vim/indent/nginx.vim" <<- 'VIMRC'
VIMRC
#clone config
git clone https://github.com/vatosarmat/dotfiles.git "dotfiles"
#hook-up config
cut -c 3- >> ".bashrc" <<- 'BASHRC'
source "$HOME/.vcs_dist/z/z.sh"
alias tmux='TERM=alacritty tmux'
source "$HOME/dotfiles/bashrc.bash"
BASHRC
cut -c 3- >> ".profile" <<- 'PROFILE'
PATH="$HOME/dotfiles/bin:$PATH"
source "$HOME/dotfiles/profile.bash"
PROFILE
function __link {
local what="$1"
#shellcheck disable=2155
local where="$(dirname "$what")"
mkdir -p "$where"
ln -s "$(realpath --relative-to "$where" "dotfiles/$what")" "$where"
}
__link ".tmux.conf" && sudo ln -s "/usr/bin/tmux" "/usr/local/bin/tmux"
__link ".inputrc"
__link ".lesskey" && lesskey
__link ".config/ranger/rc.conf" && ranger --copy-config=scope
__link ".config/systemd/user/tmux.service" && systemctl --user enable tmux
#shellcheck disable=2164
popd