-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
192 lines (164 loc) · 4.91 KB
/
configure
File metadata and controls
192 lines (164 loc) · 4.91 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#!/bin/bash
# check if git is installed or not
[[ "" == $( pacman -Qqs | grep '^git$' ) ]] && echo "You don't have git installed. Go install it!" && exit
echo -ne '\nWARNING: THIS SCRIPT WILL OVERWRITE/DELETE:\n\n~/.bashrc\n~/.bash_profile\n~/.xinitrc\n~/.vimrc\n~/.vim/\n~/.config/\n\nPress Ctrl-c and move these to a safe place if you do not want to lose this data.\n'
echo -ne '\nThis script will install my configuration of Arch Linux! Press Enter to continue or Ctrl-c to cancel.\n' && read
# install yay
sudo pacman -S --needed git base-devel
cd ~ && git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ~ && rm -rf yay
mkdir downloads documents music pictures videos
# download dotfiles (uncomment if you didn't obtain this from the repo)
# git clone https://github.com/KevinYakar/ArchConfig.git || (echo 'ERROR: Could not clone ArchConfig' && exit 1)
cd ~/ArchConfig
# make sym links for dotfiles in ~
dots=(
.bashrc
.bash_profile
.vimrc
.xinitrc
.Xresources
.fonts
)
cd
for f in ${dots[@]}; do
ln -sf ArchConfig/$f .
done
. .bashrc
cd -
# refresh fonts after linking
fc-cache
# .vim/
if [ -d "$HOME/.vim" ]; then
rm -rf ~/.vim
fi
cp -r .vim ~/.vim
# wallpapers
pictures=0
wallpapers=0
if [ -d "$HOME/pictures/" ]; then
pictures=1
if [ -d "$HOME/pictures/wallpapers/" ]; then
wallpapers=1
fi
fi
if (( $pictures == 1 )) && (( $wallpapers == 1 )); then
cd pictures/wallpapers && cp -r * ~/pictures/wallpapers && cd ~/ArchConfig
elif (( $pictures == 1 )) && (( $wallpapers == 0 )); then
cp -r pictures/wallpapers ~/pictures
elif (( $pictures == 0 )) && (( $wallpapers == 0 )); then
cp -r pictures ~
fi
mkdir ~/pictures/screenshots
# .config/
if [ -d "$HOME/.config" ]; then
rm -rf ~/.config
fi
cd && mkdir .config && cd .config
for item in $(ls ~/ArchConfig/.config); do
ln -sf ~/ArchConfig/.config/$item .
done
mkdir tmux/resurrect-files
git clone https://github.com/tmux-plugins/tpm ./tmux/plugins/tpm
cd ~/ArchConfig
# install node for coc.nvim
sudo curl -sL install-node.now.sh/lts | sudo bash
# install packages
pacmanPackages=(
'xorg-server'
'xorg-xinit'
'xorg-xset'
'xorg-xrandr'
'xorg-xprop'
'xclip'
'man'
'dmenu'
'alacritty'
'zip'
'unzip'
'nitrogen'
'neofetch'
'gucharmap'
'figlet'
'zathura'
'zathura-pdf-poppler'
'yajl'
'feh'
'gifsicle'
'firefox'
'base-devel'
'python-pip'
'rsync'
'pacman-contrib'
'mpd'
'ncmpcpp'
'sxhkd'
'scrot'
'hunspell-en_US'
'youtube-dl'
'dunst'
'calcurse'
'fzf'
'the_silver_searcher'
'tmux'
'sshpass'
'tree'
'neovim'
'ripgrep'
# fonts
'adobe-source-han-sans-jp-fonts'
'adobe-source-han-serif-jp-fonts'
'gnu-free-fonts'
'ttf-arphic-uming'
'ttf-indic-otf'
'adobe-source-sans-pro-fonts'
'adobe-source-serif-pro-fonts'
'adobe-source-han-sans-kr-fonts'
)
yayPackages=(
'ranger-git'
'betterdiscord-installer'
'go-rainbow-git'
'bpytop'
'picom-ibhagwan-git'
'polybar-dwm-module'
'mon2cam-git'
'nvim-packer-git'
# fonts
'ttf-raleway'
'ttf-iosevka'
)
sudo pacman -S ${pacmanPackages[@]}
yay -S ${yayPackages[@]}
# install ueberzug for ranger
pip install ueberzug
# vcpkg (for polybar and dwm)
cd ~/.config
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install jsoncpp
rm -rf vcpkg
# install dwm
cd ~/.config/dwm
sudo make clean install
# Apply patches
cd /etc
sudo patch < ~/ArchConfig/patches/pacman.diff
sudo patch < ~/ArchConfig/patches/sudoers.diff
# Set up firefox home page
dirname="$HOME/.config/firefox/newtab"
cd $dirname
startpageLocation="file://$HOME/.config/firefox/startpage/index.html"
replaceString="var newTabURL = \"$(echo $startpageLocation | sed -e 's/\//\\\//g')\";"
sed -ie "s/var newTabURL.*$/$replaceString/g" ./mozilla.cfg
sudo cp ./mozilla.cfg /usr/lib/firefox/
sudo cp ./local-settings.js /usr/lib/firefox/defaults/pref/
# Manual Steps
cd ~
clear
# TODO: add manual steps for install tmux stuff
echo -ne 'MANUAL TASKS\n=====================================\n\n# Vim\nTo install the vim plugins, type each\ncommand followed by the return key:\n\nvim \n:PlugInstall\n\nAnd you will be good to go after a\nminute or two!\n\n\n\n# Tmux\nTo install tmux plugins, run these\ntmux commands:\n\ntmux\n<C-a> I\n<C-a> :kill-server\n\n\n\n# Polybar\nYou may need to edit the modules in\n~/.config/polybar/config because they\nmay not be using the right data.\n\nYou should be seeing:\n\npulse\nmemory\ntemperature\nwlan\ndate\n\nin that order at the top right of\nyour screen\n\n\n\n# Firefox\nYou will also need to do one step to\nchange the firefox home/new tab page.\n\nIn firefox, navigate to Settings > Home\nand select "Custom URLs..."\n\nCopy and paste this, then restart firefox:\n\n'$startpageLocation'\n\n=====================================\n' | rainbow