-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetuptool.sh
More file actions
executable file
·99 lines (88 loc) · 3.71 KB
/
setuptool.sh
File metadata and controls
executable file
·99 lines (88 loc) · 3.71 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
#!/bin/bash
function install_for_archlinux(){
echo "Do you want to install desktop environment? [y/N]:"
read -n1 desktop
sudo pacman -Syu
case "$desktop" in
[yY]* )
#create i3wm desktop environment
sudo pacman -S --noconfirm --needed xf86-video-intel #video driver for intel iGPU
sudo pacman -S --noconfirm --needed xorg-server xorg-xinit xorg-xbacklight #X11 server
sudo pacman -S --noconfirm --needed i3-wm terminator #i3wm window manager, terminator terminal emulator
sudo pacman -S --noconfirm --needed i3-wm terminator #i3wm window manager, lightdm login interface, terminator terminal emulator
sudo pacman -S --noconfirm --needed bluez bluez-utils pulseaudio-bluetooth #bluetooth utils for GUI
sudo pacman -S --noconfirm --needed pulseaudio pavucontrol #audio utils
sudo pacman -S --noconfirm --needed xrandr #for multiple monitor
sudo pacman -S --noconfirm --needed firefox thunar feh maim xclip
#make thunar show internal storages which aren't mounted yet
sudo pacman -S --noconfirm --needed gvfs
esac
sudo pacman -S --noconfirm --needed atool neovim python3 curl fish cica #feh image viewer, atool compressing tool, fish shell, cica font
sudo pacman -S --noconfirm --needed base-devel git gnupg wget unzip
sudo systemctl disable dhcpd #disable dhcpd for avoiding conflicts between NetworkManager and dhcpd
test -n $(cat /etc/pacman.conf| grep archlinuxfr)
if [ $? = 1 ]; then
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
#sudo bash -c "echo -e '[archlinuxfr]\nSigLevel = Never\nServer =https://repo.archlinux.fr/\$arch' >> /etc/pacman.conf"
fi
yay -Syu
yay -S rofi ttf-cica polybar #rofi program luncher, cica-font, polybar
sudo systemctl disable dhcpd #disable dhcpd for avoiding conflicts between NetworkManager and dhcpd
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
#install dein and its requirements
curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh | sh
sh ./installer.sh ~/.cache/dein > /dev/null
rm ./installer.sh
sudo pacman -S --noconfirm --needed nodejs yarn python-pip
pip install neovim pynvim
#SystemVerilog language server and XeTex compiler
sudo pacman -S --noconfirm --needed cargo
}
function install_for_macos() {
brew install --cask iterm2 slack discord cursor bitwarden meetingbar
brew install docker-buildx docker-compose docker ncdu yarn mysql-client golang the_silver_searcher iperf3 tcpdump obsidian gh spotify lima python3 pyenv nmap syncthing karabiner-elements neovim fzf
}
if [ $USER == "root" ]; then
echo "!!Error: Do not run from root user."
fi
echo "Do you want to install softwares? If not, only the configs will be copied to your machine. [y/N]:"
read -n1 software
#install packages
case "$software" in
[yY]* )
if [ "$(uname)" == "Darwin" ]; then
install_for_macos
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
if [ -f /etc/arch-release ]; then
install_for_archlinux
else
echo "!!Error: This script only supports Arch Linux."
exit 1
fi
else
echo "!!Error: This script only supports Arch Linux and MacOS."
exit 1
fi
esac
#settings
#make symbolic link to .config/(some package)
for file in $(find $(pwd -P)/$(dirname $0)/config -maxdepth 1 -type d); do
if [ $(basename $file) == "config" ]; then
continue
fi
echo $(dirname $0)
echo $(pwd -P)/$(dirname $0)/config/$(basename $file)
if [ -d ~/.config/$(basename $file) ]; then
echo "skipped..."
continue
fi
ln -s $(pwd -P)/$(dirname $0)/config/$(basename $file) ~/.config/$(basename $file)
done
echo "Please execute nvim for installing coc."