Updated script
This commit is contained in:
parent
5c20c8f6d9
commit
b30c28cc1b
@ -203,7 +203,6 @@ require('lazy').setup({
|
|||||||
-- File explorer -------------------------------------------
|
-- File explorer -------------------------------------------
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
branch = '0.1.x',
|
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
opts = function()
|
opts = function()
|
||||||
local actions = require "telescope.actions"
|
local actions = require "telescope.actions"
|
||||||
@ -239,7 +238,7 @@ require('lazy').setup({
|
|||||||
|
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v2.x",
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
@ -868,6 +867,6 @@ vim.keymap.set('n', '<C-s>', ":write<cr>", { desc = 'Save', silent = true })
|
|||||||
vim.keymap.set('n', '<C-q>', ":quit<cr>", { desc = 'Quit', silent = true })
|
vim.keymap.set('n', '<C-q>', ":quit<cr>", { desc = 'Quit', silent = true })
|
||||||
vim.keymap.set('n', '<leader>n', ":tabnew<cr>", { desc = 'Format code', silent = true })
|
vim.keymap.set('n', '<leader>n', ":tabnew<cr>", { desc = 'Format code', silent = true })
|
||||||
vim.keymap.set('n', '<leader>c', ":tabclose<cr>", { desc = 'Format code', silent = true })
|
vim.keymap.set('n', '<leader>c', ":tabclose<cr>", { desc = 'Format code', silent = true })
|
||||||
vim.keymap.set('n', '<leader>e', ":NeoTreeShowToggle<cr>", { desc = 'File explorer', silent = true })
|
vim.keymap.set('n', '<leader>e', ":Neotree filesystem reveal left toggle<cr>", { desc = 'File explorer', silent = true })
|
||||||
vim.keymap.set('n', 's', ":HopWord<cr>", { desc = 'hop', silent = true })
|
vim.keymap.set('n', 's', ":HopWord<cr>", { desc = 'hop', silent = true })
|
||||||
vim.keymap.set('n', '<leader>t', ":TroubleToggle<cr>", { desc = 'Trouble view', silent = true })
|
vim.keymap.set('n', '<leader>t', ":TroubleToggle<cr>", { desc = 'Trouble view', silent = true })
|
||||||
|
|||||||
128
update.sh
128
update.sh
@ -6,6 +6,20 @@ if [ -f /etc/os-release ]; then
|
|||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
OS=$NAME
|
OS=$NAME
|
||||||
VER=$VERSION_ID
|
VER=$VERSION_ID
|
||||||
|
else
|
||||||
|
OS="none"
|
||||||
|
VER="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! $OS = "Ubuntu" ]; then
|
||||||
|
printf -- '\033[33m Ubuntu not detected\n\033[37m'
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(dpkg -l | awk '/ubuntu-desktop/ {print }'|wc -l)" -ge 1 ]; then
|
||||||
|
DESKTOP="yes"
|
||||||
|
else
|
||||||
|
DESKTOP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ubuntu 20.04 workaround
|
# Ubuntu 20.04 workaround
|
||||||
@ -108,7 +122,7 @@ rm ~/lazygit && rm ~/lazygit.tar.gz
|
|||||||
# Install gdu
|
# Install gdu
|
||||||
printf -- '\033[33m Installing gdu\n\033[37m'
|
printf -- '\033[33m Installing gdu\n\033[37m'
|
||||||
if [ $VER = "22.04" ]; then
|
if [ $VER = "22.04" ]; then
|
||||||
sudo add-apt-repository -y ppa:daniel-milde/gdu
|
sudo add-apt-repository -y ppa:daniel-milde/gdu
|
||||||
fi
|
fi
|
||||||
sudo nala update
|
sudo nala update
|
||||||
sudo nala install -y gdu
|
sudo nala install -y gdu
|
||||||
@ -163,53 +177,67 @@ sudo nala install -y nodejs
|
|||||||
# Install platformio
|
# Install platformio
|
||||||
printf -- '\033[33m Installing platformio\n\033[37m'
|
printf -- '\033[33m Installing platformio\n\033[37m'
|
||||||
if [ $VER = "24.04" ]; then
|
if [ $VER = "24.04" ]; then
|
||||||
pipx install platformio
|
pipx install platformio
|
||||||
pipx ensurepath
|
pipx ensurepath
|
||||||
else
|
else
|
||||||
pip3 install platformio
|
pip3 install platformio
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install pynvim
|
# Install pynvim
|
||||||
printf -- '\033[33m Installing pynvim\n\033[37m'
|
printf -- '\033[33m Installing pynvim\n\033[37m'
|
||||||
if [ $VER = "24.04" ]; then
|
if [ $VER = "24.04" ]; then
|
||||||
sudo nala install -y python3-pynvim
|
sudo nala install -y python3-pynvim
|
||||||
else
|
else
|
||||||
pip3 install pynvim
|
pip3 install pynvim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install neovim for node
|
# Install neovim for node
|
||||||
printf -- '\033[33m Installing neovim for node\n\033[37m'
|
printf -- '\033[33m Installing neovim for node\n\033[37m'
|
||||||
sudo npm install -g neovim
|
sudo npm install -g neovim
|
||||||
|
|
||||||
# Install Ubuntu 22.04 intune
|
if [ $DESKTOP = "yes" ]; then
|
||||||
printf -- '\033[33m Installing Ubuntu 22.04 intune\n\033[37m'
|
if [ $VER = "22.04" ]; then
|
||||||
if [ -f /home/$USER/.desktop_ubuntu_2204_intune ]; then
|
# Install Ubuntu intune
|
||||||
sudo nala install -y software-properties-common apt-transport-https curl ca-certificates
|
printf -- '\033[33m Installing intune\n\033[37m'
|
||||||
curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null
|
sudo nala install -y software-properties-common apt-transport-https curl ca-certificates
|
||||||
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list
|
curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null
|
||||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list
|
||||||
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
|
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
||||||
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" > /etc/apt/sources.list.d/microsoft-ubuntu-jammy-prod.list'
|
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
|
||||||
sudo rm microsoft.gpg
|
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" > /etc/apt/sources.list.d/microsoft-ubuntu-jammy-prod.list'
|
||||||
sudo nala update
|
sudo rm microsoft.gpg
|
||||||
sudo nala install -y microsoft-edge-stable intune-portal
|
sudo nala update
|
||||||
fi
|
sudo nala install -y microsoft-edge-stable intune-portal
|
||||||
|
fi
|
||||||
|
|
||||||
# Install Ubuntu 22.04 apps
|
# Install Ubuntu apps
|
||||||
printf -- '\033[33m Installing Ubuntu 22.04 desktop apps\n\033[37m'
|
printf -- '\033[33m Installing desktop dep.\n\033[37m'
|
||||||
if [ -f /home/$USER/.desktop ]; then
|
sudo add-apt-repository -y ppa:flatpak/stable
|
||||||
sudo add-apt-repository -y ppa:flatpak/stable
|
sudo nala update
|
||||||
sudo nala update
|
sudo nala install -y flatpak gnome-shell-extension-manager
|
||||||
sudo nala install -y flatpak kitty gnome-shell-extension-manager
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
sudo snap install --classic code
|
|
||||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
printf -- '\033[33m Installing Visual Code\n\033[37m'
|
||||||
flatpak install -y flathub com.discordapp.Discord
|
sudo snap install --classic code
|
||||||
flatpak install -y flathub org.kicad.KiCad
|
|
||||||
flatpak install -y flathub org.freecadweb.FreeCAD
|
printf -- '\033[33m Installing Discord\n\033[37m'
|
||||||
flatpak install -y flathub com.moonlight_stream.Moonlight
|
flatpak install -y flathub com.discordapp.Discord
|
||||||
flatpak install -y flathub com.jgraph.drawio.desktop
|
|
||||||
flatpak install -y flathub com.core447.StreamController
|
printf -- '\033[33m Installing KiCad\n\033[37m'
|
||||||
sudo sh -c "echo -e 'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0060\", TAG+=\"uaccess\"\\n'\
|
flatpak install -y flathub org.kicad.KiCad
|
||||||
|
|
||||||
|
printf -- '\033[33m Installing FreeCad\n\033[37m'
|
||||||
|
flatpak install -y flathub org.freecadweb.FreeCAD
|
||||||
|
|
||||||
|
printf -- '\033[33m Installing Moonlight\n\033[37m'
|
||||||
|
flatpak install -y flathub com.moonlight_stream.Moonlight
|
||||||
|
|
||||||
|
printf -- '\033[33m Installing DrawIo\n\033[37m'
|
||||||
|
flatpak install -y flathub com.jgraph.drawio.desktop
|
||||||
|
|
||||||
|
printf -- '\033[33m Installing StreamController\n\033[37m'
|
||||||
|
flatpak install -y flathub com.core447.StreamController
|
||||||
|
sudo sh -c "echo -e 'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0060\", TAG+=\"uaccess\"\\n'\
|
||||||
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0063\", TAG+=\"uaccess\"\\n'\
|
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0063\", TAG+=\"uaccess\"\\n'\
|
||||||
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"006c\", TAG+=\"uaccess\"\\n'\
|
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"006c\", TAG+=\"uaccess\"\\n'\
|
||||||
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"006d\", TAG+=\"uaccess\"\\n'\
|
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"006d\", TAG+=\"uaccess\"\\n'\
|
||||||
@ -217,13 +245,31 @@ sudo sh -c "echo -e 'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProd
|
|||||||
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0084\", TAG+=\"uaccess\"\\n'\
|
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0084\", TAG+=\"uaccess\"\\n'\
|
||||||
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"008f\", TAG+=\"uaccess\"\\n'\
|
'SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"008f\", TAG+=\"uaccess\"\\n'\
|
||||||
'KERNEL==\"uinput\", SUBSYSTEM==\"misc\", OPTIONS+=\"static_node=uinput\", TAG+=\"uaccess\", GROUP=\"input\", MODE=\"0660\"' > /etc/udev/rules.d/60-streamdeck.rules"
|
'KERNEL==\"uinput\", SUBSYSTEM==\"misc\", OPTIONS+=\"static_node=uinput\", TAG+=\"uaccess\", GROUP=\"input\", MODE=\"0660\"' > /etc/udev/rules.d/60-streamdeck.rules"
|
||||||
sudo udevadm trigger
|
sudo udevadm trigger
|
||||||
mkdir -p /home/$USER/.local/share/fonts
|
|
||||||
cd /home/$USER/.local/share/fonts
|
printf -- '\033[33m Installing NerdFonts\n\033[37m'
|
||||||
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CodeNewRoman.zip
|
mkdir -p /home/$USER/.local/share/fonts
|
||||||
unzip CodeNewRoman.zip
|
cd /home/$USER/.local/share/fonts
|
||||||
rm CodeNewRoman.zip
|
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CodeNewRoman.zip
|
||||||
fc-cache -fv
|
unzip -o CodeNewRoman.zip
|
||||||
|
rm CodeNewRoman.zip
|
||||||
|
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/NerdFontsSymbolsOnly.zip
|
||||||
|
unzip -o NerdFontsSymbolsOnly.zip
|
||||||
|
rm NerdFontsSymbolsOnly.zip
|
||||||
|
fc-cache -fv
|
||||||
|
|
||||||
|
printf -- '\033[33m Installing Virtualbox\n\033[37m'
|
||||||
|
curl https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor > oracle_vbox_2016.gpg
|
||||||
|
curl https://www.virtualbox.org/download/oracle_vbox.asc | gpg --dearmor > oracle_vbox.gpg
|
||||||
|
sudo install -o root -g root -m 644 oracle_vbox_2016.gpg /etc/apt/trusted.gpg.d/
|
||||||
|
sudo install -o root -g root -m 644 oracle_vbox.gpg /etc/apt/trusted.gpg.d/
|
||||||
|
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
|
||||||
|
sudo nala update
|
||||||
|
sudo nala install -y linux-headers-$(uname -r) dkms
|
||||||
|
sudo nala install virtualbox-7.0 -y
|
||||||
|
wget https://download.virtualbox.org/virtualbox/7.0.0/Oracle_VM_VirtualBox_Extension_Pack-7.0.0.vbox-extpack
|
||||||
|
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-7.0.0.vbox-extpack --accept-license=33d7284dc4a0ece381196fda3cfe2ed0e1e8e7ed7f27b9a9ebc4ee22e24bd23c
|
||||||
|
sudo usermod -a -G vboxusers $USER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Symlink nvim config
|
# Symlink nvim config
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Update wrapper for code_server update script
|
# Update wrapper for code_server update script
|
||||||
|
if [ $EUID != 0 ]; then
|
||||||
|
sudo "$0" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d ~/code_server ]; then
|
if [ -d ~/code_server ]; then
|
||||||
cd ~/code_server &&
|
cd ~/code_server &&
|
||||||
git pull &&
|
git pull &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user