-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·129 lines (109 loc) · 4.92 KB
/
install.sh
File metadata and controls
executable file
·129 lines (109 loc) · 4.92 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/usr/bin/env bash
clear
cd ~/.dotfiles || exit
stow --no-folding .
cd ~ || exit
sudo ln -sf ~/.dotfiles/pacman.conf /etc
paru -Sy --needed fastfetch eza zoxide btop htop yazi powertop tree tmux go sesh-bin fzf ripgrep fd jq wget tealdeer cmake clang gdb valgrind nodejs npm lua51 rustup pyenv python-pynvim python-pip php composer tree-sitter-cli xdg-user-dirs noto-fonts noto-fonts-emoji noto-fonts-cjk noto-fonts-extra kanata-git opencode
xdg-user-dirs-update
rustup default stable
ya pkg add BennyOe/tokyo-night
sudo usermod -c "AllIsNull" allisnull
sudo usermod -a -G networkmanager audio input uinput dialout allisnull
nvim_bck_created=0
nvimpager_bck_created=0
# Neovim
function neovim_install() {
cd ~/src/neovim || exit
git clone --depth=1 https://github.com/neovim/neovim.git .
sudo make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
}
if [[ -d ~/src/neovim ]]; then
printf "\e[38;5;52mWould you like to re-install NeoVim? (y/n)\e[0m "
read -re answer
if [[ "${answer,,}" == "y" ]]; then
if [[ -d ~/src/neovim.backup ]]; then
unset answer
printf "\e[38;5;52mWould you like to overwrite neovim.backup? (y/n)\e[0m "
read -re answer
if [[ "${answer,,}" == "y" ]]; then
sudo rm ~/src/neovim.backup -rf
mv ~/src/neovim ~/src/neovim.backup
nvim_bck_created=1
else
printf "\e[38;5;52mWill not overwrite neovim.backup.\e[0m\n"
fi
else
mv ~/src/neovim ~/src/neovim.backup
nvim_bck_created=1
fi
sudo rm ~/src/neovim -rf
mkdir -p ~/src/neovim
neovim_install
fi
else
mkdir -p ~/src/neovim
neovim_install
fi
# NvimPager
function nvimpager_install() {
cd ~/src/nvimpager || exit
git clone --depth=1 https://github.com/lucc/nvimpager.git .
git apply ~/.dotfiles/patches/nvimpager.patch
make PREFIX="$HOME"/.local install
}
cd ~ || exit
if [[ -d ~/src/nvimpager ]]; then
unset answer
printf "\e[38;5;52mWould you like to re-install NvimPager? (y/n)\e[0m "
read -re answer
if [[ "${answer,,}" == "y" ]]; then
if [[ -d ~/src/nvimpager.backup ]]; then
unset answer
printf "\e[38;5;52mWould you like to overwrite nvimpager.backup? (y/n):\e[0m "
read -re answer
if [[ "${answer,,}" == "y" ]]; then
sudo rm ~/src/nvimpager.backup -rf
mv ~/src/nvimpager ~/src/nvimpager.backup
nvimpager_bck_created=1
else
printf "\e[38;5;52mWill not overwrite nvimpager.backup.\e[0m\n"
fi
else
mv ~/src/nvimpager ~/src/nvimpager.backup
fi
rm ~/src/nvimpager -rf
mkdir -p ~/src/nvimpager
nvimpager_install
fi
else
mkdir -p ~/src/nvimpager
nvimpager_install
fi
# Tmux Plugins
[[ -d ~/.tmux/plugins/tpm ]] || mkdir -p ~/.tmux/plugins/tpm
git clone --depth=1 https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Zsh Plugins
[[ -d ~/.zsh/plugins/zsh-autosuggestions ]] || mkdir -p ~/.zsh/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/plugins/zsh-autosuggestions
[[ -d ~/.zsh/plugins/zsh-syntax-highlighting ]] || mkdir -p ~/.zsh/plugins/zsh-syntax-highlighting
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/plugins/zsh-syntax-highlighting
[[ -d ~/.zsh/plugins/zsh-completions ]] || mkdir -p ~/.zsh/plugins/zsh-completions
git clone --depth=1 https://github.com/zsh-users/zsh-completions.git ~/.zsh/plugins/zsh-completions
[[ -d ~/.zsh/plugins/zsh-vi-mode ]] || mkdir -p ~/.zsh/plugins/zsh-vi-mode
git clone --depth=1 https://github.com/jeffreytse/zsh-vi-mode.git ~/.zsh/plugins/zsh-vi-mode
[[ -d ~/.zsh/plugins/zsh-you-should-use ]] || mkdir -p ~/.zsh/plugins/zsh-you-should-use
git clone --depth=1 https://github.com/MichaelAquilina/zsh-you-should-use ~/.zsh/plugins/zsh-you-should-use
[[ -d ~/.zsh/plugins/powerlevel10k ]] || mkdir -p ~/.zsh/plugins/powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/plugins/powerlevel10k
[[ -d ~/.zsh/plugins/zsh-nix-shell ]] || mkdir -p ~/.zsh/plugins/zsh-nix-shell
git clone --depth=1 https://github.com/chisui/zsh-nix-shell.git ~/.zsh/plugins/zsh-nix-shell
# Git Submodules
git clone https://github.com/allisnulll/keyboard ~/.dotfiles/.config/kanata
git clone https://github.com/allisnulll/zsh-undo-dir ~/.dotfiles/.zsh/plugins/zsh-undo-dir
git clone --depth=1 https://github.com/Kiaryy/Milk-Outside-a-Bag-GTK-Theme ~/.dotfiles/.themes
git clone --depth=1 https://github.com/Kiaryy/Milk-Outside-a-Bag-Icon-Set ~/.dotfiles/.icons
stow --no-folding .
[[ $nvim_bck_created == 1 ]] && printf "\e[38;5;52mCreated backup of old neovim: ~/src/neovim.backup\e[0m\n"
[[ $nvimpager_bck_created == 1 ]] && printf "\e[38;5;52mCreated backup of old nvimpager: ~/src/nvimpager.backup\e[0m\n"