Added and updated scripts

This commit is contained in:
2024-10-03 19:48:11 +02:00
parent f4886e1c55
commit 17352dcc72
4 changed files with 138 additions and 13 deletions

View File

@@ -24,13 +24,21 @@ fi
# Ubuntu 20.04 workaround
printf -- '\033[33m Remove neovim if already installed\n\033[37m'
sudo apt -y purge --auto-remove neovim
if [ "$(dpkg -l | awk '/nala/ {print }'|wc -l)" -ge 1 ]; then
sudo nala purge -y --autoremove neovim
else
sudo apt -y purge --auto-remove neovim
fi
# Install system packages
printf -- '\033[33m Installing system packages\n\033[37m'
sudo apt update
sudo apt install -y nala
sudo nala update
if [ "$(dpkg -l | awk '/nala/ {print }'|wc -l)" -ge 1 ]; then
sudo nala update
else
sudo apt update
sudo apt install -y nala
sudo nala update
fi
sudo nala upgrade -y
sudo nala install -y gpg ninja-build gettext cmake unzip curl python3 python3-pip python3-venv \
build-essential libssl-dev libffi-dev python3-dev file tmux libudev-dev pkg-config locales pipx btop ncdu ranger
@@ -104,11 +112,10 @@ cargo install tree-sitter-cli
# Install ripgrep
printf -- '\033[33m Installing ripgrep\n\033[37m'
cargo install ripgrep
# sudo apt install -y ripgrep
# Install zellij
printf -- '\033[33m Installing zellij\n\033[37m'
cargo install --locked zellij
# Install eza
printf -- '\033[33m Installing eza\n\033[37m'
cargo install eza
# Install fd
printf -- '\033[33m Installing fd\n\033[37m'
@@ -200,11 +207,11 @@ printf -- '\033[33m Installing neovim for node\n\033[37m'
sudo npm install -g neovim
if [ $DESKTOP == "yes" ]; then
# Install Ubuntu apps
# Install flatpak
printf -- '\033[33m Installing desktop dep.\n\033[37m'
sudo add-apt-repository -y ppa:flatpak/stable
sudo nala update
sudo nala install -y flatpak gnome-shell-extension-manager remmina
sudo nala install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
printf -- '\033[33m Installing Visual Code\n\033[37m'
@@ -237,6 +244,15 @@ if [ $DESKTOP == "yes" ]; then
'KERNEL==\"uinput\", SUBSYSTEM==\"misc\", OPTIONS+=\"static_node=uinput\", TAG+=\"uaccess\", GROUP=\"input\", MODE=\"0660\"' > /etc/udev/rules.d/60-streamdeck.rules"
sudo udevadm trigger
# Install gnome-shell-extension-manager
printf -- '\033[33m Installing gnome-shell-extension-manager\n\033[37m'
sudo nala install -y gnome-shell-extension-manager
# Install remmina
printf -- '\033[33m Installing remmina\n\033[37m'
sudo nala install -y remmina
# Install NerdFonts
printf -- '\033[33m Installing NerdFonts\n\033[37m'
mkdir -p /home/$USER/.local/share/fonts
cd /home/$USER/.local/share/fonts
@@ -248,6 +264,18 @@ if [ $DESKTOP == "yes" ]; then
rm NerdFontsSymbolsOnly.zip
fc-cache -fv
# Install Wezterm
printf -- '\033[33m Installing wezterm\n\033[37m'
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg
echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list
sudo nala update
sudo nala install -y wezterm
# Symlink wezterm config
printf -- '\033[33m Symlinking wezterm config\n\033[37m'
ln -sf ~/code_server/wezterm.lua ~/.wezterm.lua
# Install Virtualbox
if [ "$(dpkg -l | awk '/virtualbox/ {print }'|wc -l)" -eq 0 ]; then
printf -- '\033[33m Installing Virtualbox\n\033[37m'
curl https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor > oracle_vbox_2016.gpg
@@ -313,6 +341,7 @@ printf -- '\033[33m Adding path to bashrc\n\033[37m'
echo 'PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
echo 'alias vi="nvim"' >> ~/.bashrc
echo 'alias vim="nvim"' >> ~/.bashrc
echo 'alias ls="eza -1 -l --icons=auto --git-repos --git"' >> ~/.bashrc
echo 'source ~/.fzf.bash' >> ~/.bashrc
if [ $DESKTOP == "no" ]; then
@@ -326,4 +355,15 @@ if [ $DESKTOP == "no" ]; then
echo "fi" >> ~/.bashrc
fi
if [ $DESKTOP == "yes" ]; then
# Add tmux/nvim autostart to bashrc
printf -- '\033[33m Adding tmux/nvim autostart to bashrc\n\033[37m'
echo "# TMUX" >> ~/.bashrc
echo "if [[ ! \$TERM =~ screen ]]; then" >> ~/.bashrc
echo "if which tmux >/dev/null 2>&1; then" >> ~/.bashrc
echo ' tmux new-session' >> ~/.bashrc
echo "fi" >> ~/.bashrc
echo "fi" >> ~/.bashrc
fi
printf -- '\033[32m \n\n***** Update complete! Please restart your terminal. *****\n\n\033[37m'