-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·97 lines (75 loc) · 2.74 KB
/
install
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env bash
set -x
cd "$HOME"
function symlink() {
if [[ ! $(readlink -f "$2") == "$1" ]]; then
ln -sfhv "$1" "$2"
fi
}
if [[ $(uname) == "Darwin" ]]; then
if ! command -v brew &>/dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install \
bat \
eza \
fd \
fzf \
gh \
git \
git-delta \
jq \
neovim \
ripgrep \
tmux \
zoxide
$(brew --prefix)/opt/fzf/install
fi
fi
OMZ_CUSTOM=${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}
if [[ ! -d $HOME/.oh-my-zsh ]]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
if [[ ! -e $OMZ_CUSTOM/themes/powerlevel10k ]]; then
git clone --depth=1 /~https://github.com/romkatv/powerlevel10k.git $OMZ_CUSTOM/themes/powerlevel10k
fi
if [[ ! -e $OMZ_CUSTOM/plugins/zsh-autosuggestions ]]; then
git clone /~https://github.com/zsh-users/zsh-autosuggestions $OMZ_CUSTOM/plugins/zsh-autosuggestions
fi
if [[ ! -e $OMZ_CUSTOM/plugins/zsh-syntax-highlighting ]]; then
git clone /~https://github.com/zsh-users/zsh-syntax-highlighting.git $OMZ_CUSTOM/plugins/zsh-syntax-highlighting
fi
if [[ ! -e $OMZ_CUSTOM/plugins/fzf-tab ]]; then
git clone /~https://github.com/Aloxaf/fzf-tab $OMZ_CUSTOM/plugins/fzf-tab
fi
if [[ ! -e $HOME/.tmux/plugins/tpm ]]; then
git clone /~https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
fi
DOTFILES="$HOME/dotfiles"
CONFIG="$HOME/.config"
symlink "$DOTFILES/gitconfig" "$HOME/.gitconfig"
symlink "$DOTFILES/p10k.zsh" "$HOME/.p10k.zsh"
symlink "$DOTFILES/tmux.conf" "$HOME/.tmux.conf"
symlink "$DOTFILES/vimrc" "$HOME/.vimrc"
symlink "$DOTFILES/zshrc" "$HOME/.zshrc"
symlink "$DOTFILES/alacritty.toml" "$CONFIG/.config"
symlink "$DOTFILES/atuin" "$CONFIG/.config/atuin"
symlink "$DOTFILES/kitty" "$CONFIG/.config/kitty"
symlink "$DOTFILES/nvim" "$CONFIG/.config/nvim"
symlink "$DOTFILES/skhd" "$CONFIG/.config/skhd"
symlink "$DOTFILES/ruff" "$CONFIG/.config/ruff"
[[ -d "$HOME/.config/git" ]] || mkdir "$HOME/.config/git"
symlink "$DOTFILES/git/ignore" "$HOME/.config/git/ignore"
[[ -d "$HOME/.config/yabai" ]] || mkdir "$HOME/.config/yabai"
for file in $(ls -1 "$DOTFILES/yabai"); do
symlink "$DOTFILES/yabai/$file" "$HOME/.config/yabai/$file"
done
[[ -d "$HOME/.local/bin" ]] || mkdir "$HOME/.local/bin"
cp "$DOTFILES"/bin/* "$HOME/.local/bin"
KITTY="/Applications/kitty.app/Contents/MacOS/kitty"
if [[ -d "$KITTY" ]]; then
symlink "$KITTY/kitty" "$HOME/.local/bin"
symlink "$KITTY/kitten" "$HOME/.local/bin"
fi
if [[ "$USER" == "$CM_USER" ]]; then
source "$DOTFILES/cm/install"
fi