-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·169 lines (139 loc) · 5.88 KB
/
setup.sh
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
#!/bin/sh
# Setup the user environment
###############################################################################
# Basic config
###############################################################################
# Ask for password and save it to don't ask for it again in the future
CORRECT_PASSWORD=false
until [ $CORRECT_PASSWORD == true ]; do
echo -n "Password: "
IFS= read -rs PASSWORD
sudo -k
if echo "$PASSWORD" | sudo -Sl &> /dev/null; then
CORRECT_PASSWORD=true
else
echo -e "\nWrong password"
fi
done
# Config yay
yay --save --answerclean None --answerdiff None --answeredit None --noremovemake --cleanafter --noprovides --sudoloop
# Update and Upgrade
yay -Syy
yes | \
# Roses are red
# violets are blue
# I have Manjaro i3
yay -Syu
# Update timezone
echo "$PASSWORD" | sudo -S timedatectl set-ntp true
# Make useful dirs
mkdir -p ~/{.Envs,Pictures/Screenshots,Workspaces/H/DB,Workspaces/J/DB}
# Clean unused apps, folders and files
yes | yay -S trash-cli
trash ~/Desktop ~/Music ~/Public ~/Templates ~/Videos
yes | yay -R deluge hexchat
trash ~/.config/hexchat
trash ~/.config/compton.conf
###############################################################################
# Installations
###############################################################################
# Fonts
yes | yay -S noto-fonts-emoji
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/JetBrainsMono.zip
unzip -d ~/.local/share/fonts JetBrainsMono.zip
trash JetBrainsMono.zip
fc-cache ~/.local/share/fonts
# Launcher
yes | yay -S rofi rofimoji
# Status bar
yes | yay -S polybar
# Audio
yes | yay -S lib32-jack && yes | install_pulse # run pulseaudio builtin installer
yes | yay -S pulseeffects
# Browsers
yes | yay -S brave google-chrome-stable
# Terminal
yes | yay -S alacritty tmux neofetch cowsay fortune-mod figlet pipes.sh lolcat shellcheck
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
trash ~/.zshrc.pre-oh-my-zsh
echo "$PASSWORD" | chsh -s "$(which zsh) $USER"
git clone https://github.com/xero/figlet-fonts ~/.local/share/figlet-fonts
git clone https://gitlab.com/dwt1/shell-color-scripts.git
echo "$PASSWORD" | sudo -S mkdir /opt/shell-color-scripts
echo "$PASSWORD" | sudo -S mv ./shell-color-scripts/colorscripts /opt/shell-color-scripts
echo "$PASSWORD" | sudo -S mv ./shell-color-scripts/colorscript.sh /usr/bin/colorscript
trash -rf ./shell-color-scripts
# Code editors
yes | yay -S visual-studio-code-bin neovim gedit
code --install-extension alefragnani.bookmarks
code --install-extension batisteo.vscode-django
code --install-extension be5invis.vscode-icontheme-nomo-dark
code --install-extension bierner.markdown-checkbox
code --install-extension christian-kohler.path-intellisense
code --install-extension chunsen.bracket-select
code --install-extension dbaeumer.vscode-eslint
code --install-extension dlasagno.wal-theme
code --install-extension esbenp.prettier-vscode
code --install-extension iocave.customize-ui
code --install-extension kaiwood.indentation-level-movement
code --install-extension krnik.vscode-jumpy
code --install-extension magicstack.magicpython
code --install-extension mechatroner.rainbow-csv
code --install-extension mrorz.language-gettext
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance
code --install-extension ms-vsliveshare.vsliveshare
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension oderwat.indent-rainbow
code --install-extension ryu1kn.text-marker
code --install-extension sirmspencer.vscode-autohide
code --install-extension sourcery.sourcery
code --install-extension usernamehw.errorlens
code --install-extension usernamehw.highlight-logical-line
code --install-extension visualstudioexptteam.vscodeintellicode
code --install-extension vsls-contrib.gistfs
code --install-extension vtrois.gitmoji-vscode
code --install-extension waderyan.gitblame
code --install-extension wholroyd.jinja
code --install-extension ybaumes.highlight-trailing-white-spaces
# Image editors
yes | yay -S inkscape pinta
# Git
yes | yay -S github-cli diff-so-fancy
git config --global pull.rebase false
git config --global core.excludesfile ~/.config/git/.gitignore
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global color.ui true
git config --global color.diff-highlight.oldNormal "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"
git config --global color.diff.meta "11"
git config --global color.diff.frag "magenta bold"
git config --global color.diff.commit "yellow bold"
git config --global color.diff.old "red bold"
git config --global color.diff.new "green bold"
git config --global color.diff.whitespace "red reverse"
# Python
pip install pipenv virtualenvwrapper ipython ipykernel pywal --user
# Deno and NodeJS
echo "$PASSWORD" | sudo -S "$(curl -fsSL https://raw.githubusercontent.com/axetroy/dvm/master/install.sh | bash)"
dvm install v1.3.0
yes | yay -S nvm
nvm install node
# Others
yes | yay -S mplayer unzip zip slop numlockx unclutter perl-anyevent-i3
###############################################################################
# Paste and config the dotfiles
###############################################################################
# Paste dotfiles and clean directory
cp -r . ~/
trash ~/dotfiles ~/.git ~/.github ~/CODE_OF_CONDUCT.md ~/CONTRIBUTING.md ~/LICENSE ~/README.md ~/docs ~/SECURITY.md ~/setup.sh
# Give permissions to commands
chmod 711 ~/.local/bin/change-background
chmod 711 ~/.local/bin/custom-scrot
chmod 711 ~/.local/bin/picture-of-the-day
chmod 711 ~/.local/bin/sleep-monitor
chmod 711 ~/.local/bin/start-script
# Run picture-of-the-day one time per day at 00:00
(crontab -l ; echo "00 00 * * * picture-of-the-day") | crontab -