-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·64 lines (56 loc) · 2.01 KB
/
install.sh
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
#!/usr/bin/env bash
# TODO: Maybe rewrite this on python??
# check this: https://github.com/anishathalye/dotbot/blob/master/bin/dotbot
set -e
DOTFILES_DIR=$(pwd)
if [[ -n "$HOMEBREW_CELLAR" ]]; then
echo "root = true" >"$HOMEBREW_CELLAR"/.editorconfig
else
echo "Might need to fix .editorconfig for $HOMEBREW_CELLAR in the future"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
# Vim mode vscode and others
# enable key repeating in specific apps on MacOS
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false # For VS Code
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
defaults write com.visualstudio.code.oss ApplePressAndHoldEnabled -bool false # For VS Codium
defaults write -g ApplePressAndHoldEnabled -bool false # For global
# defaults delete -g ApplePressAndHoldEnabled # If necessary, reset global default
# make repeat speed lighting fast
defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)
fi
(
cd "$HOME" || exit
rm -rf .gitconfig
rm -rf .vimrc
rm -rf .zprofile
rm -rf .zshrc
ln -s "$DOTFILES_DIR/gitconfig" .gitconfig
ln -s "$DOTFILES_DIR/vimrc" .vimrc
ln -s "$DOTFILES_DIR/zprofile" .zprofile
ln -s "$DOTFILES_DIR/zshrc" .zshrc
)
mkdir -p "$HOME/.config"
(
cd "$HOME/.config" || exit
rm -rf alacritty
rm -rf htop
rm -rf gitignore_global
rm -rf lesscolors.sh
rm -rf nvim
rm -rf starship.toml
ln -s "$DOTFILES_DIR/config/alacritty" alacritty
ln -s "$DOTFILES_DIR/config/htop" htop
ln -s "$DOTFILES_DIR/config/gitignore_global" gitignore_global
ln -s "$DOTFILES_DIR/config/lesscolors.sh" lesscolors.sh
ln -s "$DOTFILES_DIR/config/nvim" nvim
ln -s "$DOTFILES_DIR/config/starship.toml" starship.toml
)
mkdir -p "$HOME/bin"
(
cd "$HOME/bin" || exit
rm -rf colorless
ln -s "$DOTFILES_DIR/bin/colorless" colorless
chmod +x colorless
)