-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
187 lines (143 loc) · 6.19 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
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
#!/bin/bash
dotfilesRepoSsh="[email protected]:BasileBux/dotfiles.git"
dotfilesRepoHttps="https://github.com/BasileBux/dotfiles.git"
sudo dnf install lsb-release -y
# Check gnome and correct fedora
desktop_env=$(echo "$XDG_CURRENT_DESKTOP" | tr '[:upper:]' '[:lower:]')
if command -v lsb_release &> /dev/null; then
distro=$(lsb_release -si)
else
echo "lsb_release command not found. Unable to determine Linux distribution and version."
exit 1
fi
if [ "$desktop_env" != "gnome" ] && [ "${distro,,}" != "fedora" ]; then
echo "The base system is incorrect. This install works only on Fedora workspace with gnome"
exit 1
fi
read -p "Do you have write access to the dotfiles repo ? (Y/N) > " userAnswer
if [ "$userAnswer" = "y" ] || [ "$userAnswer" = "Y" ]; then
ownedRepo=true
elif [ "$userAnswer" = "n" ] || [ "$userAnswer" = "N" ]; then
ownedRepo=false
else
echo "Aborting installation, your choice wasn't right."
exit 1
fi
cd ~
mkdir ~/tmp
# Tools -----------------------------------------------------------------------------------------------
# sh tools.sh version
sudo dnf install git curl wget gcc make cmake grim slurp fastfetch eza fzf zoxide bat zsh -y
sudo dnf group install "C Development Tools and Libraries" -y
sudo dnf group install "Container Management" -y
# Docker
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo -y
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl start docker
# Lazygit
sudo dnf copr enable atim/lazygit -y
sudo dnf install lazygit -y
# LazyDocker
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
# Gotop
go install github.com/xxxserxxx/gotop/v4/cmd/gotop@latest
sudo ln -s ~/go/bin/gotop /bin/gotop
# EXTRAS
sudo dnf install yt-dlp yt-dlp-zsh-completion -y
# oh-my-zsh -> NOTE: REPLACE THIS WITH OH-MY-POSH INSTALL
#
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Programming -----------------------------------------------------------------------------------------
sudo dnf install golang python3 python3-pip maven -y
# Sdkman
curl -s "https://get.sdkman.io" | bash
# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Fonts -----------------------------------------------------------------------------------------------
mkdir ~/.local/share/fonts
# install getnf to download nerdfonts easily
curl -fsSL https://raw.githubusercontent.com/getnf/getnf/main/install.sh | bash
# GeistMono
getnf -i GeistMono
wget https://github.com/IdreesInc/Monocraft/releases/download/v4.0/Monocraft-ttf-otf.zip -O ~/tmp/Monocraft-ttf-otf.zip
unzip ~/tmp/Monocraft-ttf-otf.zip -d ~/.local/share/fonts
fc-cache -fv
# Apps ------------------------------------------------------------------------------------------------
# Zed
curl -f https://zed.dev/install.sh | sh # Currently problems with this
# Visual Studio Code
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
dnf check-update -y
sudo dnf install code -y
# Zen browser (Flatpak) -> currently problems with appimage
flatpak install flathub io.github.zen_browser.zen -y
# Kitty terminal
sudo dnf install kitty blueman neovim mpv -y
# VLC with dnf groups
sudo dnf group install "VideoLAN Client" -y
# Vesktop
flatpak install flathub dev.vencord.Vesktop -y
# Spotify
flatpak install flathub com.spotify.Client -y
# Hyprland --------------------------------------------------------------------------------------------
sudo dnf install hyprland hyprlock hypridle waybar wofi wlogout -y
dnf copr enable erikreider/SwayNotificationCenter
dnf install SwayNotificationCenter
# Config ----------------------------------------------------------------------------------------------
# DOTFILES
# Visual Studio Code
# Opening vscode will create the files we need
code
sleep 10
kill $(pgrep -o code)
cd ~/.config
git init .
if [ "$ownedRepo" = true ]; then
git remote add origin $dotfilesRepoSsh
else
git remote add origin $dotfilesRepoHttps
fi
git fetch origin
git checkout main
# Move all folders (except Code) in ~/.config /!\ NOT WORKING PROPERLY FILES ARE NOT COPIED
cp ~/.config/wallpaper.png ~/wallpaper.png
cp ~/.config/.zshrc ~/.zshrc
# Config vscode
if [ "$ownedRepo" = true ]; then
read -p "Enter branch name for dotfiles repo: " branchName
git checkout -b $branchName
git --set-upstream origin/main $branchName
echo "Your new branch was created and checked out."
fi
# Install VSCode extensions
code --install-extension bierner.markdown-emoji
code --install-extension bierner.markdown-preview-github-styles
code --install-extension enkia.tokyo-night
code --install-extension miguelsolorio.fluent-icons
code --install-extension monokai.theme-monokai-pro-vscode
code --install-extension ms-vscode.cmake-tools
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cpptools-extension-pack
code --install-extension ms-vscode.makefile-tools
code --install-extension pkief.material-icon-theme
code --install-extension twxs.cmake
code --install-extension vscodevim.vim
code --install-extension bierner.markdown-emoji
code --install-extension janisdd.vscode-edit-csv
code --install-extension rust-lang.rust-analyzer
code --install-extension aaron-bond.better-comments
sudo dnf upgrade -y
clear
read -p "Installation completed! Do you want to download LaTeX ?(it's pretty long and heavy) (Y/N) > " latexUser
if [ "$latexUser" = "y" ] || [ "$latexUser" = "Y" ]; then
pip3 install Pygments
sudo dnf install texlive-scheme-full
clear
echo "Installation completed have fun!\nRestart the system to be sure!"
else
echo "You didn't seem to want LaTeX. Installation completed have fun!\nRestart the system to be sure!"
fi
echo "You can remove this install script by running: rm ~/install.sh"