merging update and configure in one single script
This commit is contained in:
@@ -1,5 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
### Go to the script path
|
||||
set -e
|
||||
cd -- "$(dirname -- "$0")"
|
||||
cd ..
|
||||
[[ -f "./scripts/functions" ]] || { printf "\e[1;31m==> Error : \e[0mFunctions not found"; exit 1; }
|
||||
source ./scripts/functions
|
||||
|
||||
### Global variables
|
||||
_DIRNAME="$(pwd)"
|
||||
_PACKAGES=(arc-icon-theme chromium code curl discord dmenu dunst egl-wayland feh flameshot flatpak firefox htop hyprland i3lock i3-wm imagemagick lxappearance mpv nwg-look otf-comicshanns-nerd pavucontrol pipewire pipewire-jack pipewire-pulse polybar neofetch numlockx papirus-icon-theme picom plocate polybar remmina ttf-dejavu-nerd wget wireguard-tools xdg-desktop-portal xorg xorg-xinit)
|
||||
|
||||
### Configure pacman and install needeed packages
|
||||
_info "Configuring and updateing packages"
|
||||
_msg "Configuring pacman"
|
||||
sed -i "s|^#Color.*|Color|" /etc/pacman.conf
|
||||
sed -i "s|^#ParallelDownloads.*|ParallelDownloads = 10|" /etc/pacman.conf
|
||||
_msg "Updating packages"
|
||||
pacman -Syu --noconfirm
|
||||
_msg "Installing needeed packages"
|
||||
pacman -S --noconfirm --needed "${_PACKAGES[@]}"
|
||||
flatpak install com.github.IsmaelMartinez.teams_for_linux
|
||||
flatpak -y update
|
||||
|
||||
### Template files
|
||||
_info "templating config files"
|
||||
_TEMPLATES=(X11/.Xresources dunst/dunstrc polybar/config.ini rofi/colors.rasi)
|
||||
mkdir -p links/X11 links/dunst links/polybar links/rofi
|
||||
for template in "${_TEMPLATES[@]}"; do
|
||||
echo "$template";
|
||||
cp "./templates/$template" "./links/$template"
|
||||
_template "./links/$template"
|
||||
done
|
||||
|
||||
### Linking config files
|
||||
_info "Linking config files"
|
||||
_msg "tty links"
|
||||
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
||||
ln -sf "$_DIRNAME/links/tty/autologin.conf" /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
ln -sf "$_DIRNAME/links/tty/issue" /etc/issue
|
||||
ln -sf "$_DIRNAME/links/tty/inputrc" /etc/inputrc
|
||||
ln -sf "$_DIRNAME/links/tty/bash.bashrc" /etc/bash.bashrc
|
||||
ln -sf "$_DIRNAME/links/tty/bash.bashaliases" /etc/bash.bashaliases
|
||||
ln -sf "$_DIRNAME/links/tty/bash.bashexports" /etc/bash.bashexports
|
||||
_msg "X11 links"
|
||||
ln -sf "$_DIRNAME/links/X11/.Xresources" /etc/X11/xinit/.Xresources
|
||||
ln -sf "$_DIRNAME/links/X11/xinitrc" /etc/X11/xinit/xinitrc
|
||||
ln -sf "$_DIRNAME/links/X11/00-keyboard.conf" /etc/X11/xorg.conf.d/00-keyboard.conf
|
||||
_msg "dunst links"
|
||||
ln -sf "$_DIRNAME/links/dunst/dunstrc" /etc/dunst/dunstrc
|
||||
_msg "i3 links"
|
||||
ln -sf "$_DIRNAME/links/i3wm/config" /etc/i3/config
|
||||
_msg "polybar links"
|
||||
ln -sf "$_DIRNAME/links/polybar/config.ini" /etc/polybar/config.ini
|
||||
_msg "rofi links"
|
||||
mkdir -p ~/.config/rofi ~/.local/share/rofi/themes
|
||||
ln -sf "$_DIRNAME/links/rofi/config.rasi" ~/.config/rofi/config.rasi
|
||||
ln -sf "$_DIRNAME/links/rofi/colors.rasi" ~/.local/share/rofi/themes/colors.rasi
|
||||
ln -sf "$_DIRNAME/links/rofi/launcher.rasi" ~/.local/share/rofi/themes/launcher.rasi
|
||||
ln -sf "$_DIRNAME/links/rofi/disconnect.rasi" ~/.local/share/rofi/themes/disconnect.rasi
|
||||
_msg "picom links"
|
||||
ln -sf "$_DIRNAME/links/picom/picom.conf" /etc/xdg/picom.conf
|
||||
_msg "apps links"
|
||||
ln -sf "${_DIRNAME}/links/applications/teams.desktop" ~/.local/share/applications/teams.desktop
|
||||
|
||||
### Sed desktop entries (--no-sandbox)
|
||||
|
||||
### Wait for user
|
||||
read -r
|
||||
|
||||
Reference in New Issue
Block a user