Clean install.sh and improve p.sh

This commit is contained in:
2025-03-11 16:49:34 +00:00
parent 826f316fe8
commit d14c8033b9
4 changed files with 30 additions and 157 deletions

View File

@@ -1,43 +1,5 @@
#!/bin/bash
# Parse flags
help_message="Usage: $0 [--desktop|-d | --hyprland|-h | --terminal|-t]
Options:
--desktop, -d Install desktop programs and configure GNOME (must already be installed).
--hyprland, -h Install desktop programs and Hyprland.
--terminal, -t Only install the basic dependencies for CLI use."
if [ $# -eq 0 ]; then
echo "$help_message"
exit 1
fi
while [[ $# -gt 0 ]]; do
case "$1" in
--desktop | -d)
desktop=true
hyprland=false
shift
;;
--hyprland | -h)
desktop=true
hyprland=true
shift
;;
--terminal | -t)
desktop=false
hyprland=false
shift
;;
*)
echo "Unknown option: $1"
echo "$help_message"
exit 1
;;
esac
done
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
@@ -75,49 +37,7 @@ echo -e "${CYAN}Package managers: ${PURPLE}${packageManagers[@]}${NC}"
echo
# Install Programs
programs=(neovim curl git tmux htop fzf gcc make)
if $desktop; then
programs+=(
tldr # Simplified man pages
fastfetch # System information
timeshift # System restore
s-tui # CPU monitoring / Detect overheating
#weechat # IRC client
#w3m # Text-based web browser
#nnn # File manager
#taskwarrior # Task manager
#mutt # Email client
#pass-otp # Password manager
#zbar-tools # QR code reader
)
fi
if $hyprland; then
if [[ " ${packageManagers[@]} " =~ "pacman" ]]; then
programs+=(
dunst # Notifications
foot # Terminal
hyprland # Window manager
hyprlock # Screen locker
hyprpaper # Wallpaper manager
hyprpicker # Color picker
hyprpolkitagent # Auth pop-up for sudo access
nautilus # File manager
network-manager # Network manager
pipewire # Audio server
udiskie # Automount USB drives
waybar # Status bar
wireplumber # PipeWire session manager
wofi # Launcher
xdg-desktop-portal-hyprland # D-Bus support for Hyprland programs
)
else
echo -e "${RED}[E] Hyprland not available in your distro's repositories.${NC}"
exit 3
fi
fi
programs=(neovim curl git tmux htop fzf gcc make tldr s-tui)
p i ${programs[@]}
# Copy files
@@ -160,14 +80,12 @@ else
fi
# Load Dconf (GNOME settings)
if $desktop; then
if [[ "$OSTYPE" != "darwin"* ]]; then
echo -e "${YELLOW}[+] Loading Dconf settings...${NC}"
dconf load / <$HOME/dotfiles/dconf-settings.ini
if [ $? -ne 0 ]; then
echo -e "${RED}[E] Error loading Dconf settings.${NC}"
else
echo -e "${GREEN}[I] Dconf settings loaded successfully.${NC}"
fi
if [[ "$OSTYPE" != "darwin"* ]]; then
echo -e "${YELLOW}[+] Loading Dconf settings...${NC}"
dconf load / <$HOME/dotfiles/dconf-settings.ini
if [ $? -ne 0 ]; then
echo -e "${RED}[E] Error loading Dconf settings.${NC}"
else
echo -e "${GREEN}[I] Dconf settings loaded successfully.${NC}"
fi
fi