Dotfiles/setup/modules/Desktop-Environments/sway.sh

41 lines
1.4 KiB
Bash

#!/bin/bash
set -euo pipefail
echo "=== Sway Environment Installer ==="
# 1. Install packages
echo "Installing required packages..."
sudo pacman -Syu --noconfirm --needed \
brightnessctl btop dmenu foot glfw grim \
greetd-tuigreet gst-plugin-pipewire imagemagick iwd libpulse \
libva-intel-driver libva-mesa-driver lightdm lightdm-gtk-greeter \
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 \
zram-generator
# 2. Enable services
echo "Enabling services..."
sudo systemctl enable NetworkManager.service
# 3. greetd config
sudo cp -f ~/Dotfiles/desktopenvs/hyprland/greetd-tuigreet/config.toml /etc/greetd/config.toml
sudo systemctl enable greetd.service
# 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
echo "=== Sway installation complete. Run shell-setup.sh if you haven't already, then reboot. ==="