-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·92 lines (75 loc) · 2.11 KB
/
install.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
#!/bin/bash
# Clean install. Uncomment to disable
# CLEAN_INSTALL=1
nice_keys () {
echo "Stage 1: Map Caps Lock to Ctrl"
sudo localectl set-x11-keymap us pc105 '' ctrl:nocaps
}
fix_broken () {
sudo apt --fix-broken install --yes
}
update_packages () {
"Stage 2: Update existing packages"
fix_broken
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
}
install_programs () {
echo "Stage 3: installing packages."
if $CLEAN_INSTALL; then
clean_install
else
dirty_install
fi
}
dirty_install () {
sudo apt-key add ./apt/my_repo.keys
sudo cp -R ./apt/sources.list* /etc/apt/
sudo apt-get update
sudo apt-get install dselect && sudo dselect update
sudo dpkg --set-selections < ./apt/my_packages.list
sudo apt-get dselect-upgrade -y
}
install_fzf () {
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
}
install_bls () {
sudo ./betterlockscreen.sh
}
clean_install () {
sudo add-apt-repository ppa:peek-developers/stable --yes
sudo add-apt-repository ppa:mmstick76/alacritty --yes
sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa --yes
cli="fish neovim ripgrep fd-find python3 python ranger python3-pip"
fonts="fonts-noto fonts-font-awesome fonts-powerline fonts-hack-ttf"
daily="i3 i3blocks firefox-trunk emacs nm-tray xinit alacritty telegram-desktop"
tools="flameshot compton htop zathura texlive pandoc feh"
input="fcitx fcitx-googlepinyin"
wayland="light wl-clipboard wofi"
fix_broken
sudo apt install $cli $fonts $daily $tools $input --yes
install_fzf
# neovim with python support
pip3 install neovim
# tldr
sudo snap install tldr
# betterlockscreen
# install_bls
}
post_install () {
echo "Stage 5: Post installation phase."
# use fish
sudo chsh -s $(which fish) $(whoami)
# use nvim as vim
sudo update-alternatives --config vim
# use i3
echo "exec i3" > ~/.xinitrc && startx
}
main () {
nice_keys
# update_packages &&
# install_programs &&
# ./scripts/stow_all.sh
# post_install
}
main