-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch_setup
executable file
·125 lines (94 loc) · 3.36 KB
/
arch_setup
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
#!/bin/sh
# Create the user and switch to user
read -p "Pick a username: " username
useradd -m $username
echo "Now pick a password"
passwd $username
echo "Log in as your new username!"
su $username
# cd to /home/$username and create some directories
cd /home/$username
mkdir Documents
mkdir Downloads
# Acticate multilib
sudo vim /etc/pacman.conf +"g/\#\[multilib\]/normal 0xjx" +wq
# Set pacman.conf options
sudo vim /etc/pacman.conf +"g/\#Color/normal 0xOILoveCandy" +wq
# Sync time
sudo timedatectl set-ntp true
# Update and install pacman-contrib
sudo pacman -Syu
sudo pacman -S pacman-contrib
# Update mirrorlist
echo "Updating mirror list... one moment please"
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/TheRealYougCraft/personal-scripts/master/mirrorlist-update)"
# Install packages
sudo pacman -S $(curl -fsSL https://raw.githubusercontent.com/TheRealYougCraft/personal-scripts/master/install_packages)
nvidia-modprobe
# Specify Laptop or desktop
python -c "$(curl -fsSl https://raw.githubusercontent.com/TheRealYougCraft/personal-scripts/master/desktop_or_laptop)" $username
# Install scripts repo
git clone https://github.com/TheRealYougCraft/personal-scripts /home/$username/scripts
chmod +x /home/$username/scripts/*
# Make config dir
mkdir -p /home/$username/.config
# Clone dotfiles repo
git clone https://github.com/TheRealYougCraft/dotfiles /home/$username/dotfiles
# Install Vundle
git clone https://github.com/VundleVim/Vundle.vim.git /home/$username/.vim/bundle/Vundle.vim
# Install bumblebee-status for i3-gaps
git clone https://github.com/tobi-wan-kenobi/bumblebee-status /home/$username/.config/bumblebee-status
# Install yay
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
# Install AUR packages
yay -S $(curl -fsSL https://raw.githubusercontent.com/TheRealYougCraft/personal-scripts/master/aur_install)
# Install Oh-My-Zsh!
export ZSH=/home/$username/.oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Remove any old configs
sudo rm -f .zshrc .vimrc .tmux.conf
# Export config files
mkdir -p /home/$username/.config/i3/
mkdir -p /home/$username/.config/alacritty/
sudo mkdir -p /etc/X11/xorg.conf.d/
sudo python /home/$username/dotfiles/export.py $username
# Set default shell to zsh
chsh -s /bin/zsh
# Install Vundle Plugins
vim +PluginInstall +qall
# Install bumblebee-status module dependencies
sudo python -m pip install psutil
# Fix Discord crackling
sudo vim /etc/pulse/default.pa +"g/load-module module-udev-detect/normal A tsched=0" +wq
# Make grub config
sudo sh /home/$username/scripts/grub-update
# Enable services
sudo systemctl enable lightdm
sudo systemctl enable NetworkManager
# Make nvidia X11 config
sudo nvidia-xconfig
# Set up cronjobs
sudo systemctl enable cronie
sudo systemctl start cronie
crontab ~/.crontab
sudo crontab ~/.sudocron
# Inform the user
echo "Restart your terminal for more changes to take effect!"
echo "Remember to set up the following:
- X (check /etc/X11/xorg.conf)
- lightdm
- lightdm-mini-greeter
- lxappearance
Additionally:
Change the workspace monitor
assignments in ~/dotfiles/config if you
have a multi-monitor setup.
Remember to always make changes in the
git repos by using either 'dotfl' or 'scpt'
to pull changes first. Then for changed dotfiles
you can run suexport.
All changes will take effect on reboot."