forked from zerowidth/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·56 lines (50 loc) · 2.92 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
#!/bin/sh
zshrc() {
echo "==========================================================="
echo " cloning zsh-autosuggestions "
echo "-----------------------------------------------------------"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
echo "==========================================================="
echo " cloning zsh-syntax-highlighting "
echo "-----------------------------------------------------------"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
echo "==========================================================="
echo " cloning powerlevel10k "
echo "-----------------------------------------------------------"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
echo "==========================================================="
echo " import zshrc "
echo "-----------------------------------------------------------"
cat .zshrc > $HOME/.zshrc
echo "==========================================================="
echo " import powerlevel10k "
echo "-----------------------------------------------------------"
cat .p10k.zsh > $HOME/.p10k.zsh
}
# change time zone
# sudo ln -fs /usr/share/zoneinfo/America/Chicago /etc/localtime
# sudo dpkg-reconfigure --frontend noninteractive tzdata
# Install GitHub CLI
echo "==========================================================="
echo " installing GitHub CLI "
echo "-----------------------------------------------------------"
if [ "$(uname)" = "Darwin" ]; then
brew install gh
elif [ "$(uname)" = "Linux" ]; then
type -p curl >/dev/null || sudo apt install curl -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh -y
fi
zshrc
# make directly highlighting readable - needs to be after zshrc line
echo "" >> ~/.zshrc
echo "# remove ls and directory completion highlight color" >> ~/.zshrc
echo "_ls_colors=':ow=01;33'" >> ~/.zshrc
echo 'zstyle ":completion:*:default" list-colors "${(s.:.)_ls_colors}"' >> ~/.zshrc
echo 'LS_COLORS+=$_ls_colors' >> ~/.zshrc
# set gitconfig defaults
git config --global push.autoSetupRemote true
git config --global core.editor "code --wait"