diff --git a/setup/modules/Desktop-Environments/sway.sh b/setup/modules/Desktop-Environments/sway.sh index ae08f76..619a05b 100644 --- a/setup/modules/Desktop-Environments/sway.sh +++ b/setup/modules/Desktop-Environments/sway.sh @@ -1,76 +1,40 @@ #!/bin/bash set -euo pipefail -# Install packages +echo "=== Sway Environment Installer ===" + +# 1. Install packages echo "Installing required packages..." sudo pacman -Syu --noconfirm --needed \ - alacritty base base-devel brightnessctl btop btrfs-progs cmatrix dmenu \ - fastfetch firefox foot git greetd-tuigreet glfw gnu-netcat grim grub \ - gst-plugin-pipewire hollywood htop imagemagick iwd libpulse \ + brightnessctl btop dmenu foot glfw grim \ + greetd-tuigreet gst-plugin-pipewire imagemagick iwd libpulse \ libva-intel-driver libva-mesa-driver lightdm lightdm-gtk-greeter \ - linux linux-firmware lynx micro nano networkmanager nmap openssh \ - pavucontrol pipewire pipewire-alsa pipewire-jack pipewire-pulse \ - slurp smartmontools sway swaybg swayidle swaylock \ - ttf-jetbrains-mono vim vulkan-intel vulkan-radeon waybar wget \ - wireless_tools wireplumber wireshark-qt wofi wpa_supplicant \ + networkmanager pavucontrol pipewire pipewire-alsa pipewire-jack pipewire-pulse \ + slurp sway swaybg swayidle swaylock alacritty \ + ttf-jetbrains-mono vulkan-intel vulkan-radeon waybar wget \ + wireplumber wofi wpa_supplicant \ xdg-utils xf86-video-amdgpu xf86-video-ati xf86-video-nouveau \ xf86-video-vmware xorg-server xorg-xinit xorg-xwayland \ - yazi zram-generator zsh zsh-completions + zram-generator -# yay -if ! command -v yay &>/dev/null; then - echo "Installing yay..." - mkdir -p ~/install-tmp - git clone https://aur.archlinux.org/yay.git ~/install-tmp/yay - cd ~/install-tmp/yay - makepkg -si --noconfirm - cd ~ -else - echo "yay already installed." -fi - -# Services -echo "Enabling NetworkManager..." +# 2. Enable services +echo "Enabling services..." sudo systemctl enable NetworkManager.service -# Desktop env configs -echo "Linking desktop environment configs..." -ln -sf ~/Dotfiles/desktopenvs/sway/sway ~/.config/sway -ln -sf ~/Dotfiles/desktopenvs/sway/alacritty ~/.config/alacritty - -# Shell -echo "Setting up zsh..." -chsh -s /usr/bin/zsh - -echo "Installing Starship..." -curl -sS https://starship.rs/install.sh | sh -s -- --yes - -echo "Installing oh-my-zsh..." -RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" - -echo "Installing oh-my-zsh plugins..." -ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}" -git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ - "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" -git clone https://github.com/zsh-users/zsh-autosuggestions \ - "$ZSH_CUSTOM/plugins/zsh-autosuggestions" - -# greetd config +# 3. greetd config sudo cp -f ~/Dotfiles/desktopenvs/hyprland/greetd-tuigreet/config.toml /etc/greetd/config.toml sudo systemctl enable greetd.service -# Dotfiles -echo "Linking dotfiles..." +# 4. Copy DE configs +echo "Copying configs..." +CONFIGS=(sway alacritty) +for cfg in "${CONFIGS[@]}"; do + rm -rf ~/.config/"$cfg" + cp -r ~/Dotfiles/desktopenvs/sway/"$cfg" ~/.config/ +done + cp ~/Dotfiles/colors.conf ~/.config/colors.conf cp ~/Dotfiles/apply-theme.sh ~/apply-theme.sh chmod +x ~/apply-theme.sh -rm -f ~/.bashrc ~/.zshrc -ln -sf ~/Dotfiles/.bashrc ~/.bashrc -ln -sf ~/Dotfiles/.zshrc ~/.zshrc -ln -sf ~/Dotfiles/starship.toml ~/.config/starship.toml -ln -sf ~/Dotfiles/micro/ ~/.config/micro -ln -sf ~/Dotfiles/yazi/ ~/.config/yazi -mkdir -p ~/.config/spotify-tui -ln -sf ~/Dotfiles/spotify-tui/config.yml ~/.config/spotify-tui/config.yml -echo "=== Sway installation complete. Reboot to start. ===" +echo "=== Sway installation complete. Run shell-setup.sh if you haven't already, then reboot. ==="