Updated scripts
This commit is contained in:
parent
5dc3889513
commit
b3179bee2e
@ -21,7 +21,6 @@ exec-once = /home/cm/linuxbox/set-xr18-2ch.sh
|
||||
exec-once = udiskie
|
||||
exec-once = waybar
|
||||
exec-once = systemctl --user start sunshine
|
||||
exec-once = org.remmina.Remmina -i
|
||||
|
||||
exec-once = [workspace 1] $terminal
|
||||
exec-once = [workspace 2] $browser
|
||||
@ -301,13 +300,6 @@ windowrulev2 = size 80% 80%, initialTitle:^(Moonlight)$
|
||||
windowrulev2 = center, initialTitle:^(Moonlight)$
|
||||
windowrulev2 = dimaround, initialTitle:^(Moonlight)$
|
||||
|
||||
# Remmina
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(Remmina)$
|
||||
windowrulev2 = float, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = size 80% 80%, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = center, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = dimaround, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
|
||||
# KiCad
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(.*KiCad.*)$
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(.*PCB Editor.*)$
|
||||
|
||||
@ -20,7 +20,6 @@ exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = udiskie
|
||||
exec-once = waybar
|
||||
exec-once = systemctl --user start sunshine
|
||||
exec-once = org.remmina.Remmina -i
|
||||
|
||||
exec-once = [workspace 1] $terminal
|
||||
exec-once = [workspace 2] $browser
|
||||
@ -300,13 +299,6 @@ windowrulev2 = size 80% 80%, initialTitle:^(Moonlight)$
|
||||
windowrulev2 = center, initialTitle:^(Moonlight)$
|
||||
windowrulev2 = dimaround, initialTitle:^(Moonlight)$
|
||||
|
||||
# Remmina
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(Remmina)$
|
||||
windowrulev2 = float, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = size 80% 80%, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = center, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = dimaround, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
|
||||
# KiCad
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(.*KiCad.*)$
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(.*PCB Editor.*)$
|
||||
|
||||
@ -297,13 +297,6 @@ windowrulev2 = float, onworkspace:special:mixer
|
||||
windowrulev2 = size 80% 80%, onworkspace:special:mixer
|
||||
workspace = special:mixer, on-created-empty:pavucontrol
|
||||
|
||||
# Remmina
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(Remmina)$
|
||||
windowrulev2 = float, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = size 80% 80%, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = center, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = dimaround, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
windowrulev2 = suppressevent maximize, class:.*
|
||||
|
||||
|
||||
@ -272,7 +272,7 @@ windowrulev2 = float, onworkspace:special:ranger
|
||||
windowrulev2 = size 80% 80%, onworkspace:special:ranger
|
||||
workspace = special:ranger, on-created-empty:kitty ranger
|
||||
|
||||
# Wivrn
|
||||
# Envision
|
||||
windowrulev2 = float, onworkspace:special:envision
|
||||
windowrulev2 = size 80% 80%, onworkspace:special:envision
|
||||
workspace = special:envision, on-created-empty:envision
|
||||
@ -306,13 +306,6 @@ windowrulev2 = size 80% 80%, initialTitle:^(Moonlight)$
|
||||
windowrulev2 = center, initialTitle:^(Moonlight)$
|
||||
windowrulev2 = dimaround, initialTitle:^(Moonlight)$
|
||||
|
||||
# Remmina
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(Remmina)$
|
||||
windowrulev2 = float, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = size 80% 80%, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = center, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
windowrulev2 = dimaround, initialTitle:^(Remmina Remote Desktop Client)$
|
||||
|
||||
# KiCad
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(.*KiCad.*)$
|
||||
windowrulev2 = workspace emptyn, initialTitle:^(.*PCB Editor.*)$
|
||||
|
||||
156
update_arch.sh
156
update_arch.sh
@ -5,51 +5,47 @@ sudo -v
|
||||
if ! pacman -Qs inetutils >/dev/null; then
|
||||
sudo pacman -Syy --noconfirm inetutils
|
||||
fi
|
||||
if ! pacman -Qs awk >/dev/null; then
|
||||
sudo pacman -Syy --noconfirm awk
|
||||
fi
|
||||
|
||||
HOSTNAME=$(hostname | awk '{ print toupper($0) }')
|
||||
HOSTNAME=$(hostname | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
GAME="no"
|
||||
VR="no"
|
||||
DESKTOP_BASE="no"
|
||||
DESKTOP_WORK="no"
|
||||
CODE="no"
|
||||
NVIDIA_GPU="no"
|
||||
NVIDIA_1080_GPU="no"
|
||||
TERMINAL="no"
|
||||
HYPERLAND="no"
|
||||
# Declare associative array for roles
|
||||
declare -A ROLES
|
||||
for role in GAME VR DESKTOP_BASE DESKTOP_WORK CODE NVIDIA_GPU NVIDIA_1080_GPU TERMINAL HYPERLAND; do
|
||||
ROLES["$role"]="no"
|
||||
done
|
||||
|
||||
if [ "$HOSTNAME" == "CMBOX" ]; then
|
||||
DESKTOP_BASE="yes"
|
||||
DESKTOP_WORK="yes"
|
||||
CODE="yes"
|
||||
TERMINAL="yes"
|
||||
HYPERLAND="yes"
|
||||
fi
|
||||
if [ "$HOSTNAME" == "STEAMBOX" ]; then
|
||||
GAME="yes"
|
||||
VR="yes"
|
||||
DESKTOP_BASE="yes"
|
||||
NVIDIA_GPU="yes"
|
||||
TERMINAL="yes"
|
||||
HYPERLAND="yes"
|
||||
fi
|
||||
if [ "$HOSTNAME" == "LABBOX" ]; then
|
||||
DESKTOP_BASE="yes"
|
||||
CODE="yes"
|
||||
TERMINAL="yes"
|
||||
HYPERLAND="yes"
|
||||
fi
|
||||
if [ "$HOSTNAME" == "SIMONBOX" ]; then
|
||||
GAME="yes"
|
||||
VR="yes"
|
||||
DESKTOP_BASE="yes"
|
||||
NVIDIA_1080_GPU="yes"
|
||||
TERMINAL="yes"
|
||||
HYPERLAND="yes"
|
||||
fi
|
||||
# Assign roles per hostname
|
||||
case "$HOSTNAME" in
|
||||
CMBOX)
|
||||
ROLES[DESKTOP_BASE]="yes"
|
||||
ROLES[DESKTOP_WORK]="yes"
|
||||
ROLES[CODE]="yes"
|
||||
ROLES[TERMINAL]="yes"
|
||||
ROLES[HYPERLAND]="yes"
|
||||
;;
|
||||
STEAMBOX)
|
||||
ROLES[GAME]="yes"
|
||||
ROLES[VR]="yes"
|
||||
ROLES[DESKTOP_BASE]="yes"
|
||||
ROLES[NVIDIA_GPU]="yes"
|
||||
ROLES[TERMINAL]="yes"
|
||||
ROLES[HYPERLAND]="yes"
|
||||
;;
|
||||
LABBOX)
|
||||
ROLES[DESKTOP_BASE]="yes"
|
||||
ROLES[CODE]="yes"
|
||||
ROLES[TERMINAL]="yes"
|
||||
ROLES[HYPERLAND]="yes"
|
||||
;;
|
||||
SIMONBOX)
|
||||
ROLES[GAME]="yes"
|
||||
ROLES[VR]="yes"
|
||||
ROLES[DESKTOP_BASE]="yes"
|
||||
ROLES[NVIDIA_1080_GPU]="yes"
|
||||
ROLES[TERMINAL]="yes"
|
||||
ROLES[HYPERLAND]="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -e ' \e[H\e[2J
|
||||
\e[0;34m.
|
||||
@ -64,34 +60,13 @@ echo -e ' \e[H\e[2J
|
||||
|
||||
\e[1;32mCMtec '$HOSTNAME' install/Update script.\e[0;37m
|
||||
'
|
||||
# Print enabled roles
|
||||
printf -- ' \033[37m'
|
||||
if [ "$GAME" == "yes" ]; then
|
||||
printf -- 'GAME, '
|
||||
fi
|
||||
if [ "$VR" == "yes" ]; then
|
||||
printf -- 'VR, '
|
||||
fi
|
||||
if [ "$DESKTOP_BASE" == "yes" ]; then
|
||||
printf -- 'DESKTOP_BASE, '
|
||||
fi
|
||||
if [ "$DESKTOP_WORK" == "yes" ]; then
|
||||
printf -- 'DESKTOP_WORK, '
|
||||
fi
|
||||
if [ "$CODE" == "yes" ]; then
|
||||
printf -- 'CODE, '
|
||||
fi
|
||||
if [ "$TERMINAL" == "yes" ]; then
|
||||
printf -- 'TERMINAL, '
|
||||
fi
|
||||
if [ "$HYPERLAND" == "yes" ]; then
|
||||
printf -- 'HYPERLAND, '
|
||||
fi
|
||||
if [ "$NVIDIA_GPU" == "yes" ]; then
|
||||
printf -- 'NVIDIA_GPU, '
|
||||
fi
|
||||
if [ "$NVIDIA_1080_GPU" == "yes" ]; then
|
||||
printf -- 'NVIDIA_1080_GPU, '
|
||||
for role in "${!ROLES[@]}"; do
|
||||
if [ "${ROLES[$role]}" == "yes" ]; then
|
||||
printf '%s, ' "$role"
|
||||
fi
|
||||
done
|
||||
printf -- '\n\n\033[37m'
|
||||
|
||||
sleep 1
|
||||
@ -109,7 +84,7 @@ if pacman -Qs timeshift >/dev/null; then
|
||||
fi
|
||||
|
||||
# Enable multilib (if applicable)
|
||||
if [ "$GAME" == "yes" ]; then
|
||||
if [ "${ROLES[GAME]}" == "yes" ]; then
|
||||
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
|
||||
printf -- '\033[33m Enabling multilib\n\033[37m'
|
||||
sudo tee -a /etc/pacman.conf >/dev/null <<EOT
|
||||
@ -127,7 +102,7 @@ sudo pacman --noconfirm --needed -S base-devel linux-headers git
|
||||
ln -sf ~/linuxbox/gitconfig ~/.gitconfig
|
||||
|
||||
# Install drivers (if applicable)
|
||||
if [ "$NVIDIA_GPU" == "yes" ] || [ "$NVIDIA_1080_GPU" == "yes" ]; then
|
||||
if [ "${ROLES[NVIDIA_GPU]}" == "yes" ] || [ "${ROLES[NVIDIA_1080_GPU]}" == "yes" ]; then
|
||||
# Install nvidia drivers
|
||||
printf -- '\033[33m Installing NVIDIA drivers\n\033[37m'
|
||||
|
||||
@ -139,15 +114,15 @@ if [ "$NVIDIA_GPU" == "yes" ] || [ "$NVIDIA_1080_GPU" == "yes" ]; then
|
||||
NEW_KERNEL="yes"
|
||||
fi
|
||||
|
||||
if [ "$NVIDIA_GPU" == "yes" ]; then
|
||||
if [ "${ROLES[NVIDIA_GPU]}" == "yes" ]; then
|
||||
sudo pacman --noconfirm --needed -S nvidia-open-dkms
|
||||
elif [ "$NVIDIA_1080_GPU" == "yes" ]; then
|
||||
elif [ "${ROLES[NVIDIA_1080_GPU]}" == "yes" ]; then
|
||||
sudo pacman --noconfirm --needed -S nvidia-dkms
|
||||
fi
|
||||
|
||||
sudo pacman --noconfirm --needed -S nvidia-utils nvidia-settings opencl-nvidia cuda
|
||||
|
||||
if [ "$GAME" == "yes" ]; then
|
||||
if [ "${ROLES[GAME]}" == "yes" ]; then
|
||||
sudo pacman --noconfirm --needed -S lib32-nvidia-utils
|
||||
fi
|
||||
|
||||
@ -187,7 +162,7 @@ fi
|
||||
|
||||
# Install initial system packages
|
||||
printf -- '\033[33m Installing initial system packages\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S timeshift cmake gawk wget gettext unzip curl inetutils python python-pip python-pipx python-pipenv python-pynvim rustup
|
||||
sudo pacman --noconfirm --needed -S timeshift bc git-lfs cmake gawk wget gettext unzip curl inetutils python python-pip python-pipx python-pipenv python-pynvim rustup
|
||||
yay --noconfirm -S --needed --aur downgrade
|
||||
rustup update stable
|
||||
rustup default stable
|
||||
@ -197,7 +172,7 @@ ln -sf ~/linuxbox/update_wrapper.sh ~/.local/bin/update
|
||||
sudo localectl set-locale LANG=en_US.UTF-8
|
||||
|
||||
# Install hyprland
|
||||
if [ "$HYPERLAND" == "yes" ]; then
|
||||
if [ "${ROLES[HYPERLAND]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing hyprland\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S usbutils plymouth dracut dunst hyprpaper hypridle hyprland hyprlock xdg-desktop-portal-hyprland polkit-gnome xorg-xhost gnome-keyring qt5ct qt6ct gnome-themes-extra qt5-wayland qt6-wayland lxappearance qt5-tools
|
||||
|
||||
@ -254,7 +229,7 @@ if [ "$HYPERLAND" == "yes" ]; then
|
||||
fi
|
||||
|
||||
# Install terminal utility
|
||||
if [ "$TERMINAL" == "yes" ]; then
|
||||
if [ "${ROLES[TERMINAL]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing terminal utilities\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S kitty btop ranger tmux fd neovim
|
||||
mkdir -p ~/.config/kitty
|
||||
@ -299,7 +274,7 @@ if [ "$TERMINAL" == "yes" ]; then
|
||||
fi
|
||||
|
||||
# Install code utilie
|
||||
if [ "$CODE" == "yes" ]; then
|
||||
if [ "${ROLES[CODE]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing code utilities\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S code gdu ruby bottom go php luarocks composer jdk-openjdk julia nodejs npm platformio-core
|
||||
sudo npm install -g neovim
|
||||
@ -341,11 +316,12 @@ if [ "$CODE" == "yes" ]; then
|
||||
fi
|
||||
|
||||
# Install desktop utility
|
||||
if [ "$DESKTOP_BASE" == "yes" ]; then
|
||||
if [ "${ROLES[DESKTOP_BASE]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing desktop base utilities\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S feh
|
||||
flatpak install -y flathub io.github.equicord.equibop
|
||||
flatpak install -y flathub com.behringer.XAirEdit
|
||||
flatpak install -y flathub com.moonlight_stream.Moonlight
|
||||
yay --noconfirm -S --needed --aur brave-bin
|
||||
|
||||
printf -- '\033[33m Installing NerdFonts\n\033[37m'
|
||||
@ -381,21 +357,20 @@ EOT
|
||||
sudo systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ "$DESKTOP_WORK" == "yes" ]; then
|
||||
if [ "${ROLES[DESKTOP_WORK]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing desktop work utilities\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S kicad freecad
|
||||
flatpak install -y flathub org.kde.krita
|
||||
flatpak install -y flathub com.prusa3d.PrusaSlicer
|
||||
flatpak install -y flathub com.jgraph.drawio.desktop
|
||||
flatpak install -y flathub org.gimp.GIMP
|
||||
flatpak install -y flathub org.remmina.Remmina
|
||||
flatpak install -y flathub com.moonlight_stream.Moonlight
|
||||
fi
|
||||
|
||||
# Install game utility
|
||||
if [ "$GAME" == "yes" ]; then
|
||||
if [ "${ROLES[GAME]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing game utilities\n\033[37m'
|
||||
sudo pacman -S --noconfirm --needed wine-staging winetricks wine-mono wine-gecko qt5-tools
|
||||
sudo pacman -S --noconfirm --needed wine-staging
|
||||
sudo pacman -S --noconfirm --needed winetricks wine-mono wine-gecko qt5-tools
|
||||
sudo pacman -S --noconfirm --needed steam
|
||||
yay --noconfirm -S --needed --aur protonup-qt protontricks
|
||||
yay --noconfirm -S --needed --aur lug-helper
|
||||
@ -410,13 +385,24 @@ if [ "$GAME" == "yes" ]; then
|
||||
fi
|
||||
|
||||
# Install vr utility
|
||||
if [ "$VR" == "yes" ]; then
|
||||
if [ "${ROLES[VR]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing vr utilities\n\033[37m'
|
||||
sudo pacman -S --noconfirm --needed bc git-lfs cli11 glib2-devel nlohmann-json glew
|
||||
sudo pacman -S --noconfirm --needed cli11 glib2-devel nlohmann-json glew
|
||||
yay --noconfirm -S --needed --aur monado-vulkan-layers-git
|
||||
yay --noconfirm -S --needed --aur wlx-overlay-s-git
|
||||
yay --noconfirm -S --needed --aur xrgear
|
||||
yay --noconfirm -S --needed --aur envision-xr-git
|
||||
fi
|
||||
|
||||
# Install lab utility
|
||||
if [ "${ROLES[LAB]}" == "yes" ]; then
|
||||
printf -- '\033[33m Installing lab utilities\n\033[37m'
|
||||
yay --noconfirm -S --needed --aur ps7_libpicoipp ps7_libpicocv
|
||||
yay --noconfirm -S --needed --aur picoscope7
|
||||
yay --noconfirm -S --needed --aur ps7_libps2000a
|
||||
yay --noconfirm -S --needed --aur nrf-udev
|
||||
yay --noconfirm -S --needed --aur nrfconnect-appimage
|
||||
cd~ && wget "https://git.cmtec.se/cm/spm6103_viewer/-/raw/main/spm6103_viewer.py?ref_type=heads&inline=false"
|
||||
fi
|
||||
|
||||
printf -- '\033[32m \n\n***** Update complete! Please reboot. *****\n\n\033[37m'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user