-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·269 lines (215 loc) · 10.1 KB
/
install
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
#!/bin/bash
# If you see anything that can be improved/fixed, please create a pull request :)
# Directory this file is being run from
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
os=$(uname) # Determine what OS is being used
sudo -v # Ask for user password immediately so it doesn't keep asking multiple times
echo -n "Email for git: "
read GIT_EMAIL
echo "source ~/git/dotfiles/bashrc" >> ~/.bashrc
echo "source ~/git/dotfiles/vimrc.vim" >> ~/.vimrc
if [[ ! -z "$GIT_EMAIL" ]] ; then
echo -n "Name for git: "
read GIT_NAME
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_NAME"
fi
# Install Plug for vim if it is not installed
mkdir -p "~/.vim/autoload/"
[[ ! -f "~/.vim/autoload/plug.vim" ]] ; curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# From this point on, all the commands are operating-system specific
if [[ $os == "Linux" ]] ; then # Arch-based systems only
sudo pacman-key --populate archlinux
sudo pacman --noconfirm --needed --noprogressbar -Syyu git discord gimp discord youtube-dl calibre chromium neofetch obs-studio thunderbird mlocate unrar xorg-xev vim amfora mpv feh zathura zathura-pdf-mupdf tree krename kid3 archlinux-keyring base-devel python-pip
# Not a pacman package: ttf-ms-fonts, steam, zoom, snapd, foobar
# TODO: Install Zoom at https://zoom.us/download#client_4meeting
# TODO: After installing the Zoom zip file, run this in your CWD:
# sudo pacman -U zoom_x86_64.pkg.tar.xz
# TODO: To be done manually: Run texlive-installer after instaled for CLI
# TODO: Manjaro only
# pacman -Syyu snapd
# TODO: Change, this only works for Manjaro
# pacman -S --noconfirm --needed --noprogressbar git base-devel yay
# Arch version instructions here:
# https://www.debugpoint.com/2021/01/install-yay-arch/
# Setup snapd
# TODO: Manjaro only
# Install yay
cd /opt
sudo git clone https://aur.archlinux.org/yay-git.git
sudo chown -R $(whoami):$(whoami) ./yay-git
cd yay-git
makepkg -si
# systemctl enable --now snapd.socket
# ln -s /var/lib/snapd/snap /snap
yay --nocleanmenu --noeditmenu --nodiffmenu --noupgrademenu --noredownload --combinedupgrade --save # Stop from asking for prompts
yay -Syu --devel # Perform system upgrade, but also check for development package updates.
yay -Syuq gparted musikcube ytfzf minecraft-launcher spotify brave-bin newsboat-git polybar transmission-cli plex-media-server toilet texlive-installer google-chrome
# gparted: Drive partition manager
# musikcube: Music terminal application
# texlive-installer: Used to install LaTeX and its libraries
# google-chrome: Just so chromedriver works
systemctl enable sshd # Allow incoming SSH on networks
systemctl enable plexmediaserver
systemctl enable transmission-daemon
# Other apps I would like to install via terminal commands
# megasync
# Whatsapp
# Installing pip packages
pip install base64
pip install bs4
pip install imdbpy
pip install pick
pip install pillow
pip install py2app
pip install pygame
pip install PyGetWindow
pip install pyperclip
pip install pyqrcode
pip install pyserial
pip install pytesseract
pip install pytube
pip install rawpy
pip install requests
pip install selenium
pip install Send2Trash
pip install spotipy
pip install termcolor
pip install numpy
pip install termcolor
pip install tkinter
pip install unidecode
pip install webbrowser
elif [[ $os == "Darwin" ]] ; then
echo "source ~/git/dotfiles/vimrc" >> ~/.vimrc
# Install Plug for vim if it is not installed
mkdir -p "~/.vim/autoload/"
[[ ! -f "~/.vim/autoload/plug.vim" ]] ; curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sudo easy_install pip # Install pip
# Install homebrew packages and apps
brew tap makeworld-the-better-one/tap # Used to install amfora
brew -q install amfora \
bash \
newsboat \
--cask steam \
--cask itsycal \
--cask gimp \
--cask qlab \
--cask visual-studio-code \
--cask calibre \
chromedriver \
--cask discord \
ffmpeg \
--cask google-backup-and-sync \
groff qs \
--cask microsoft-auto-update \
--cask microsoft-excel \
--cask microsoft-powerpoint \
--cask microsoft-word \
--cask mutespotifyads \
--cask spotify \
--cask the-unarchiver \
wget --with-libressl \
terminal-notifier \
awk \
node \
mpv \
--cask vlc \
--cask loopback \
zathura \
zathura-pdf-mupdf \
ncdu \
cmatrix \
imagemagick \
musikcube \
tree \
toilet \
--cask iterm2 \
--cask brave-browser
python3 -m pip install base64 \
bs4 \
imdbpy \
pick \
pillow \
py2app \
pygame \
PyGetWindow \
pyperclip \
pyqrcode \
pyserial \
pytesseract \
pytube \
rawpy \
requests \
selenium \
Send2Trash \
spotipy \
termcolor \
numpy \
termcolor \
tkinter \
unidecode \
webbrowser \
youtube-dl
# Link the version of Python to the homebrew's python
brew -q link [email protected]
# Automatically restart if the conputer freezes
sudo systemsetup -setrestartfreeze on
# Make Finder able to "Quit"
defaults write com.apple.finder QuitMenuItem -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Save screenshots to the Downloads folder
defaults write com.apple.screencapture location -string "~/Downloads"
# Save screenshots in JPG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "jpg"
killall SystemUIServer
# Disable autoplay videos in Safari
defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false
defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false
# Turn off the creation of .DS_Store files
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Copy email addresses as `[email protected]` instead of `Foo Bar <[email protected]>` in Mail.app
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
# Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app
defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\U21a9"
touch ~/.hushlogin # Removing the "Last login: blah blah blah" on Terminal startup
# Disable spell check on iMessage
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false
# Get imgcat so you can display images in iTerm2
sudo curl -o /usr/local/bin/imgcat -0 https://iterm2.com/utilities/imgcat && sudo chmod +x /usr/local/bin/imgcat
# When opening TextEdit, display a new .txt file instead of the file picker
defaults write com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false
# Security fix by Sun Knuden (though I changed 127.0.0.1 to 0.0.0.0 because it is faster and still does the job)
echo "0.0.0.0 ocsp.apple.com isrg.trustid.ocsp.identrust.com" | sudo tee -a /etc/hosts
# Set Dark mode
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'
# Link Python3 to Python (since 2.7 is depricated)
ln -s -f /usr/local/bin/python3.9 /usr/local/bin/python
# Installing youtube-dl
# sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
# sudo chmod a+rx /usr/local/bin/youtube-dl
# EDIT: Installing YouTubeDL from Homebrew
echo "Please change default browser to brave here..."
read "Press ENTER when done" nil
open https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne # Stylus
open https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm # ublock
fi