Add fish shell install and config
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
skip_watermark=false
|
||||
if [ "$1" = "--skip-watermark" ]; then
|
||||
skip_watermark=true
|
||||
fi
|
||||
|
||||
if [ "$skip_watermark" = false ]; then
|
||||
echo '
|
||||
____ _ _ _ _ _
|
||||
| __ ) _ _ __ _| |_ _(_)_ __ | | ___ | | | ___
|
||||
| _ \| | | | / _ | \ \ / / | _ \| |/ _ \| | |/ _ \
|
||||
| |_) | |_| | | (_| | |\ V /| | | | | | (_) | | | (_) |
|
||||
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
||||
|___/
|
||||
|
||||
--------------- FISH Install Script ---------------
|
||||
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. See the LICENCE for more detail
|
||||
'
|
||||
fi
|
||||
|
||||
# Show disclaimer
|
||||
echo "This script will add fish functions and install fish"
|
||||
|
||||
# Enable exit on error
|
||||
set -eu
|
||||
|
||||
# Install prerequisites if installed skips
|
||||
|
||||
if ! command -v zsh >/dev/null && command -v git >/dev/null && command -v curl >/dev/null && command -v fzf >/dev/null; then
|
||||
if command -v pacman >/dev/null; then
|
||||
echo "pacman detected. Installing prerequisites"
|
||||
sudo pacman -S fish git curl fzf --noconfirm
|
||||
fi
|
||||
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt detected. Installing prerequisites"
|
||||
sudo apt install git curl fish fzf -y
|
||||
fi
|
||||
fi
|
||||
|
||||
fish=$(which fish)
|
||||
|
||||
# Clone or pull end-4 dotfiles repository
|
||||
if [ -d dots-hyprland ]; then
|
||||
cd dots-hyprland && git pull && cd ..
|
||||
else
|
||||
git clone https://github.com/end-4/dots-hyprland.git
|
||||
fi
|
||||
|
||||
# Copy fish config files from end-4 to git repo if they don't exist
|
||||
if [ ! -f configs/fish/config.fish ]; then
|
||||
cp dots-hyprland/dots/.config/fish/config.fish configs/fish/config.fish
|
||||
fi
|
||||
|
||||
if [ ! -f configs/fish/auto-Hypr.fish ]; then
|
||||
cp dots-hyprland/dots/.config/fish/auto-Hypr.fish configs/fish/auto-Hypr.fish
|
||||
fi
|
||||
|
||||
if [ ! -f configs/fish/fish_variables ]; then
|
||||
cp dots-hyprland/dots/.config/fish/fish_variables configs/fish/fish_variables
|
||||
fi
|
||||
|
||||
# Copy color configs from end-4 to git repo if they don't exist
|
||||
if [ ! -f configs/hypr/hyprland/colors.conf ]; then
|
||||
cp dots-hyprland/dots/.config/hypr/hyprland/colors.conf configs/hypr/hyprland/colors.conf
|
||||
fi
|
||||
|
||||
if [ ! -f configs/hypr/hyprlock/colors.conf ]; then
|
||||
cp dots-hyprland/dots/.config/hypr/hyprlock/colors.conf configs/hypr/hyprlock/colors.conf
|
||||
fi
|
||||
|
||||
# Run end-4 setup script with flags to skip unnecessary components
|
||||
dots-hyprland/setup install --force --skip-plasmaintg --skip-backup --skip-quickshell --skip-hyprland --skip-hyprland-entry
|
||||
|
||||
# Create fish config directory
|
||||
mkdir -p "$HOME/.config/fish"
|
||||
|
||||
# Copy fish config files to user config if they don't exist
|
||||
if [ ! -f "$HOME/.config/fish/config.fish" ]; then
|
||||
cp configs/fish/config.fish "$HOME/.config/fish/config.fish"
|
||||
fi
|
||||
|
||||
if [ -d configs/fish/functions ] && [ ! -d "$HOME/.config/fish/functions" ]; then
|
||||
cp -r configs/fish/functions "$HOME/.config/fish/"
|
||||
fi
|
||||
|
||||
if [ -d configs/fish/conf.d ] && [ ! -d "$HOME/.config/fish/conf.d" ]; then
|
||||
cp -r configs/fish/conf.d "$HOME/.config/fish/"
|
||||
fi
|
||||
|
||||
if [ ! -f "$HOME/.config/fish/auto-Hypr.fish" ]; then
|
||||
cp configs/fish/auto-Hypr.fish "$HOME/.config/fish/"
|
||||
fi
|
||||
|
||||
# Copy color configs to user config if they don't exist
|
||||
if [ ! -f "$HOME/.config/hypr/hyprland/colors.conf" ]; then
|
||||
cp configs/hypr/hyprland/colors.conf "$HOME/.config/hypr/hyprland/colors.conf"
|
||||
fi
|
||||
|
||||
if [ ! -f "$HOME/.config/hypr/hyprlock/colors.conf" ]; then
|
||||
cp configs/hypr/hyprlock/colors.conf "$HOME/.config/hypr/hyprlock/colors.conf"
|
||||
fi
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ echo '
|
||||
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
||||
|___/
|
||||
|
||||
--------------- Single Download script (Beta) ---------------
|
||||
--------------- Single Download script (Stable) ---------------
|
||||
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE,
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
See the LICENCE for more detail
|
||||
@@ -33,7 +33,7 @@ function error_handler() {
|
||||
trap error_handler ERR
|
||||
|
||||
#Install prerequisites
|
||||
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
|
||||
sudo pacman -Syu git zsh curl wget libnewt --noconfirm --needed
|
||||
|
||||
if command -v pacman >/dev/null; then
|
||||
echo "pacman detected. Installing prerequisites"
|
||||
|
||||
+25
-15
@@ -32,19 +32,18 @@ function error_handler() {
|
||||
# Trap errors
|
||||
trap error_handler ERR
|
||||
|
||||
#Install prerequisites
|
||||
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
|
||||
# Install prerequisites
|
||||
|
||||
if command -v pacman >/dev/null; then
|
||||
echo "pacman detected. Installing prerequisites"
|
||||
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
|
||||
sudo pacman -Syu git zsh curl wget libnewt rsync --noconfirm --needed
|
||||
fi
|
||||
|
||||
if command -v apt >/dev/null; then
|
||||
echo "apt detected. Installing prerequisites"
|
||||
sudo apt update
|
||||
sudo apt full-upgrade -y
|
||||
sudo apt install git zsh curl wget whiptail -y
|
||||
sudo apt install git zsh curl wget whiptail rsync -y
|
||||
fi
|
||||
|
||||
# Ensure whiptail is installed
|
||||
@@ -77,12 +76,13 @@ fi
|
||||
|
||||
# Options for the whiptail menu
|
||||
OPTIONS=(
|
||||
1 "Run zsh setup script" ON
|
||||
2 "Run LazyVim setup script" OFF
|
||||
3 "Install Docker" OFF
|
||||
4 "Install Pacman Packages" ON
|
||||
5 "Install Yay and AUR Packages" ON
|
||||
6 "Install affinity with GUI" OFF
|
||||
1 "Run zsh setup script" OFF
|
||||
2 "Run fish setup script (NOT CREATED)" ON
|
||||
3 "Run LazyVim setup script" OFF
|
||||
4 "Install Docker" OFF
|
||||
5 "Install Pacman Packages" ON
|
||||
6 "Install Yay and AUR Packages" ON
|
||||
7 "Install affinity with GUI" OFF
|
||||
)
|
||||
|
||||
CHOICE=$(whiptail --title "Installation Options" --checklist \
|
||||
@@ -114,7 +114,17 @@ for selection in $CHOICE; do
|
||||
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark
|
||||
fi
|
||||
;;
|
||||
"2")
|
||||
"2")
|
||||
echo "Running fish setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "fish.sh" ]]; then
|
||||
echo "Found local script, running..."
|
||||
bash fish.sh --skip-watermark
|
||||
else
|
||||
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/fish.sh)" --skip-watermark
|
||||
fi
|
||||
;;
|
||||
"3")
|
||||
echo "Running LazyVim setup script..."
|
||||
# Runs local script unless it does not exist or fails
|
||||
if [[ -f "LazyVim.sh" ]];then
|
||||
@@ -124,7 +134,7 @@ for selection in $CHOICE; do
|
||||
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/LazyVim.sh | bash
|
||||
fi
|
||||
;;
|
||||
"3")
|
||||
"4")
|
||||
echo "Installing Docker..."
|
||||
if ! command -v docker >/dev/null; then
|
||||
echo "docker is NOT installed. Installing..."
|
||||
@@ -136,7 +146,7 @@ for selection in $CHOICE; do
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"4")
|
||||
"5")
|
||||
echo "Installing Pacman Packages..."
|
||||
# Check if pacman binary is installed
|
||||
if command -v pacman </dev/null; then
|
||||
@@ -156,7 +166,7 @@ for selection in $CHOICE; do
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"5")
|
||||
"6")
|
||||
echo "Installing Yay and Yay Packages..."
|
||||
# Check for pacman before installing yay
|
||||
if command -v pacman </dev/null; then
|
||||
@@ -205,7 +215,7 @@ for selection in $CHOICE; do
|
||||
echo "+ sleep 10" && sleep 10
|
||||
fi
|
||||
;;
|
||||
"6")
|
||||
"7")
|
||||
echo "Installing GUI dependencies"
|
||||
if command -v pacman </dev/null; then
|
||||
echo "Pacman found"
|
||||
|
||||
Reference in New Issue
Block a user