Compare commits

...

9 Commits

Author SHA1 Message Date
alvinlollo 3b72e59529 Remove tree function from .zshrc change exec with Sudo into alt+S
Removed the tree function from .zshrc configuration.
2026-06-20 23:47:25 +10:00
alvinlollo fcd61b1ee9 Fix monitor patch 2026-06-20 23:19:12 +10:00
alvinlollo 8d0f64d305 Add fish shell install and config 2026-06-20 23:13:24 +10:00
alvinlollo 30cc51cb2f Add fix for nwg displays 2026-06-20 23:12:22 +10:00
alvinlollo 75a29f8d47 Made beta version stable 2026-05-08 21:26:41 +10:00
alvinlollo 3d4731e61e Added fish shell config 2026-05-08 21:21:33 +10:00
alvinlollo 0d8a50e8bd Added ghostty intergration 2026-05-03 22:08:45 +10:00
alvinlollo 8ae028f1c7 Merge branch 'main' of github.com:alvinlollo/Single-install-script 2026-04-15 20:06:02 +10:00
alvinlollo e3ed7c31d9 Added homebrew 2026-04-15 20:05:36 +10:00
17 changed files with 486 additions and 81 deletions
+12 -10
View File
@@ -5,6 +5,16 @@ export PATH="$HOME/.local/bin:$PATH"
export WAYLAND_DISPLAY=$WAYLAND_DISPLAY export WAYLAND_DISPLAY=$WAYLAND_DISPLAY
export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR
# Homebrew (If installed)
if [[ -f "/home/linusbrew/.linuxbrew/bin/brew" ]]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv zsh)"
fi
# Ghostty (If exists)
if [ -n "${GHOSTTY_RESOURCES_DIR}" ]; then
builtin source "${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
fi
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh export ZSH=~/.oh-my-zsh
@@ -142,14 +152,6 @@ update () {
omz update omz update
} }
tree () {
if [ "$1" >/dev/null ]; then
eza --tree --git --no-time --no-permissions --level $1
else
eza --tree --git --no-time --no-permissions
fi
}
# Sudo last command with control + u # Sudo last command with control + u
zle -N sudo-last-command-execute zle -N sudo-last-command-execute
@@ -159,8 +161,8 @@ sudo-last-command-execute() {
} }
# Bind the widget to Control+U # Bind the widget to Alt+S
bindkey '^U' sudo-last-command-execute bindkey '^[S' sudo-last-command-execute
# Ydotool # Ydotool
if [[ -f "/tmp/.ydotool_socket" ]]; then if [[ -f "/tmp/.ydotool_socket" ]]; then
+5
View File
@@ -0,0 +1,5 @@
# Auto start Hyprland on tty1
if test -z "$DISPLAY" ;and test "$XDG_VTNR" -eq 1
mkdir -p ~/.cache
exec start-hyprland > ~/.cache/hyprland.log 2>&1
end
@@ -0,0 +1,14 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
# set --global fish_key_bindings fish_default_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings
@@ -0,0 +1,14 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
# set --global fish_key_bindings fish_default_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings
@@ -0,0 +1,37 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion 555 brblack
set --global fish_color_cancel -r
set --global fish_color_command blue
set --global fish_color_comment red
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end green
set --global fish_color_error brred
set --global fish_color_escape brcyan
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_normal normal
set --global fish_color_operator brcyan
set --global fish_color_param cyan
set --global fish_color_quote yellow
set --global fish_color_redirection cyan --bold
set --global fish_color_search_match --background=111
set --global fish_color_selection white --bold --background=brblack
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_completion normal
set --global fish_pager_color_description B3A06D yellow -i
set --global fish_pager_color_prefix cyan --bold --underline
set --global fish_pager_color_progress brwhite --background=cyan
set --global fish_pager_color_selected_background -r
@@ -0,0 +1,37 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion 555 brblack
set --global fish_color_cancel -r
set --global fish_color_command blue
set --global fish_color_comment red
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end green
set --global fish_color_error brred
set --global fish_color_escape brcyan
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_normal normal
set --global fish_color_operator brcyan
set --global fish_color_param cyan
set --global fish_color_quote yellow
set --global fish_color_redirection cyan --bold
set --global fish_color_search_match --background=111
set --global fish_color_selection white --bold --background=brblack
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_completion normal
set --global fish_pager_color_description B3A06D yellow -i
set --global fish_pager_color_prefix cyan --bold --underline
set --global fish_pager_color_progress brwhite --background=cyan
set --global fish_pager_color_selected_background -r
+48
View File
@@ -0,0 +1,48 @@
# Commands to run in interactive sessions can go here
if status is-interactive
# No greeting
set fish_greeting
# Use starship
function starship_transient_prompt_func
starship module character
end
if test "$TERM" != "linux"
starship init fish | source
enable_transience
end
# Colors
if test -f ~/.local/state/quickshell/user/generated/terminal/sequences.txt
cat ~/.local/state/quickshell/user/generated/terminal/sequences.txt
end
# Aliases
# kitty doesn't clear properly so we need to do this weird printing
alias clear "printf '\033[2J\033[3J\033[1;1H'"
alias celar "printf '\033[2J\033[3J\033[1;1H'"
alias claer "printf '\033[2J\033[3J\033[1;1H'"
alias pamcan pacman
alias q 'qs -c ii'
if test "$TERM" != "linux"
alias ls 'eza --icons'
end
if test "$TERM" = "xterm-kitty"
alias ssh 'kitten ssh'
end
end
set -gx PATH $HOME/.local/bin $HOME/bin /usr/local/bin /usr/bin $PATH
export WAYLAND_DISPLAY=$WAYLAND_DISPLAY
export XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR
# Homebrew (If installed)
if test -f "/home/linusbrew/.linuxbrew/bin/brew"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv zsh)"
end
# Ydotool
if test -f "/tmp/.ydotool_socket"
set -gx YDOTOOL_SOCKET /tmp/.ydotool_socket
end
+6
View File
@@ -0,0 +1,6 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:4300
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher
SETUVAR _fisher_upgraded_to_4_4:\x1d
+3
View File
@@ -0,0 +1,3 @@
function edit --wraps=nvim --description 'alias edit=nvim'
nvim $argv
end
+3
View File
@@ -0,0 +1,3 @@
function lzd --wraps=lazydocker --description 'alias lzd=lazydocker'
lazydocker $argv
end
+3
View File
@@ -0,0 +1,3 @@
function precmd --wraps="print -Pn '\\e]133;D;%?\\a\\e]133;A\\a'" --description "alias precmd=print -Pn '\\e]133;D;%?\\a\\e]133;A\\a'"
print -Pn '\e]133;D;%?\a\e]133;A\a' $argv
end
+3
View File
@@ -0,0 +1,3 @@
function preexec --wraps="print -Pn '\\e]133;B\\a\\e]133;C\\a'" --description "alias preexec=print -Pn '\\e]133;B\\a\\e]133;C\\a'"
print -Pn '\e]133;B\a\e]133;C\a' $argv
end
+41
View File
@@ -0,0 +1,41 @@
function update --description 'Automatically finds binarys and uses update commands'
if command -v pacman >/dev/null && command -v yay >/dev/null
echo "✅ 'pacman' and 'yay' found. Updating."
sudo pacman -Syu --noconfirm
yay -Syu --sudoloop --save --answerclean None --answerdiff None --noconfirm
else if command -v pacman >/dev/null
echo "✅ 'pacman' found. Updating."
sudo pacman -Syu --noconfirm
end
if command -v paru >/dev/null
echo "✅ 'paru' found. Updating."
paru -Syu
end
if command -v apt >/dev/null
echo "✅ 'apt' found. Updating."
sudo apt update && sudo apt full-upgrade -y
end
if command -v hyprpm >/dev/null
echo "✅ 'hyprpm' found. Updating."
hyprpm reload
sleep 2
hyprpm update
end
if command -v flatpak >/dev/null
echo "✅ 'flatpak' found. Updating."
flatpak update -y
end
if command -v npm >/dev/null
echo "✅ 'npm' found. Updating."
sudo npm install -g npm-check-updates
end
if command -v omz >/dev/null
omz update
end
end
Executable
+105
View File
@@ -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
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
set -euo pipefail
# Fixes nwg-displays not auto-updating monitor/workspace configs on hyprctl reload
# in Hyprland 0.55+ Lua-based configs.
#
# Problem: require() caches modules in package.loaded, so updated monitors.lua
# is ignored on config reload. Solution: clear the cache before require().
# See https://lua.org/manual/5.1/manual.html#pdf-require
HYPR_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr"
MAIN_LUA="$HYPR_DIR/hyprland.lua"
if [ ! -f "$MAIN_LUA" ]; then
echo "Error: $MAIN_LUA not found. Is Hyprland 0.55+ configured with Lua?"
exit 1
fi
# Create a backup (only if none exists)
if [ ! -f "$MAIN_LUA.bak" ]; then
cp "$MAIN_LUA" "$MAIN_LUA.bak"
echo "Backup saved: $MAIN_LUA.bak"
fi
patched=0
# Fix monitors
if grep -q 'require("monitors")' "$MAIN_LUA" && \
! grep -q 'package.loaded\["monitors"\]' "$MAIN_LUA"; then
sed -i 's/^\s*--\s*require("monitors")/package.loaded["monitors"] = nil\nrequire("monitors")/' "$MAIN_LUA"
echo "Patched: monitors.lua require() cache cleared"
patched=1
else
echo "Skipped monitors: already patched or not found"
fi
# Fix workspaces
if grep -q 'require("workspaces")' "$MAIN_LUA" && \
! grep -q 'package.loaded\["workspaces"\]' "$MAIN_LUA"; then
sed -i 's/^\s*--\s*require("workspaces")/package.loaded["workspaces"] = nil\nrequire("workspaces")/' "$MAIN_LUA"
echo "Patched: workspaces.lua require() cache cleared"
patched=1
else
echo "Skipped workspaces: already patched or not found"
fi
if [ "$patched" -eq 1 ]; then
echo ""
echo "Done! Run 'hyprctl reload' or restart Hyprland for the fix to take effect."
echo "nwg-displays changes should now apply immediately."
else
echo ""
echo "No changes needed."
fi
+76 -56
View File
@@ -16,7 +16,7 @@ echo '
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/ |____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|___/ |___/
--------------- Single Download script --------------- --------------- Single Download script (Stable) ---------------
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE, 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. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
See the LICENCE for more detail See the LICENCE for more detail
@@ -33,7 +33,7 @@ function error_handler() {
trap error_handler ERR trap error_handler ERR
#Install prerequisites #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 if command -v pacman >/dev/null; then
echo "pacman detected. Installing prerequisites" echo "pacman detected. Installing prerequisites"
@@ -82,6 +82,7 @@ OPTIONS=(
3 "Install Docker" OFF 3 "Install Docker" OFF
4 "Install Pacman Packages" ON 4 "Install Pacman Packages" ON
5 "Install Yay and AUR Packages" ON 5 "Install Yay and AUR Packages" ON
6 "Install affinity with GUI" OFF
) )
CHOICE=$(whiptail --title "Installation Options" --checklist \ CHOICE=$(whiptail --title "Installation Options" --checklist \
@@ -110,7 +111,7 @@ for selection in $CHOICE; do
echo "Found local script, running..." echo "Found local script, running..."
bash zsh.sh --skip-watermark bash zsh.sh --skip-watermark
else else
bash -c "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark
fi fi
;; ;;
"2") "2")
@@ -138,74 +139,93 @@ for selection in $CHOICE; do
"4") "4")
echo "Installing Pacman Packages..." echo "Installing Pacman Packages..."
# Check if pacman binary is installed # Check if pacman binary is installed
if ! command -v pacman >/dev/null; then if command -v pacman </dev/null; then
echo "Cannot proceed: pacman binary not found" echo "Cannot proceed: pacman binary not found"
exit 1 # exit with an error exit 1 # exit with an error
else fi
# Install pacman packages # Install pacman packages
# Runs local script unless it does not exit or fails # Runs local script unless it does not exit or fails
if [[ -f "./configs/PackagesPacman.txt" ]]; then if [[ -f "./configs/PackagesPacman.txt" ]]; then
echo "Found local config" echo "Found local config"
cat ./configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm cat ./configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm; then elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm; then
echo "--------------------------------------------------------------------" echo "--------------------------------------------------------------------"
echo "Failed to install Pacman packages. You can try running it manually:" echo "Failed to install Pacman packages. You can try running it manually:"
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm" echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesPacman.txt | sudo pacman -S - --needed --noconfirm"
echo "--------------------------------------------------------------------" echo "--------------------------------------------------------------------"
echo "+ sleep 10" && sleep 10 echo "+ sleep 10" && sleep 10
fi
fi fi
;; ;;
"5") "5")
echo "Installing Yay and Yay Packages..." echo "Installing Yay and Yay Packages..."
# Check for pacman before installing yay # Check for pacman before installing yay
if ! command -v pacman >/dev/null; then if command -v pacman </dev/null; then
echo "Cannot proceed: Not a arch based system" echo "Cannot proceed: Not a arch based system"
exit 1 # Exit with an error exit 1 # Exit with an error
else fi
# Install yay prerequisites # Install yay prerequisites
if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl go fakeroot debugedit make gcc; then if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl golang fakeroot debugedit make gcc; then
echo "--------------------------------------------------------------------"
echo "Failed to install prerequisite packages for Yay. You can try running it manually:"
echo "sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl golang fakeroot debugedit make gcc"
echo "--------------------------------------------------------------------"
exit 1 # exit with an error
fi
# Check if yay binary exists
if ! command -v yay >/dev/null; then
echo "yay is NOT installed. Running installation commands..."
if ! git clone https://aur.archlinux.org/yay.git /tmp/yay_install; then
echo "--------------------------------------------------------------------" echo "--------------------------------------------------------------------"
echo "Failed to install prerequisite packages for Yay. You can try running it manually:" echo "Failed to clone yay repository. You can try running it manually:"
echo "sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl go fakeroot debugedit make gcc" echo "git clone https://aur.archlinux.org/yay.git /tmp/yay_install"
echo "--------------------------------------------------------------------"
exit 1 # exit with an error
elif ! (cd /tmp/yay_install && makepkg -si --noconfirm); then
echo "--------------------------------------------------------------------"
echo "Failed to build and install yay. You can try running it manually:"
echo "cd /tmp/yay_install && makepkg -si --noconfirm"
echo "--------------------------------------------------------------------" echo "--------------------------------------------------------------------"
exit 1 # exit with an error exit 1 # exit with an error
fi fi
# Check if yay binary exists cd $PreviousWD
if ! command -v yay >/dev/null; then rm -rf /tmp/yay_install
echo "yay is NOT installed. Running installation commands..." else
if ! git clone https://aur.archlinux.org/yay.git /tmp/yay_install; then echo "Yay is already installed."
echo "--------------------------------------------------------------------" fi
echo "Failed to clone yay repository. You can try running it manually:" # Install yay packages
echo "git clone https://aur.archlinux.org/yay.git /tmp/yay_install" # Runs local script unless it does no exist or fails
echo "--------------------------------------------------------------------" if [[ -f "./config/PackagesYay.txt" ]]; then
exit 1 # exit with an error echo "Found local config"
elif ! (cd /tmp/yay_install && makepkg -si --noconfirm); then cat ./config/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm
echo "--------------------------------------------------------------------" elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm; then
echo "Failed to build and install yay. You can try running it manually:" echo "--------------------------------------------------------------------"
echo "cd /tmp/yay_install && makepkg -si --noconfirm" echo "Failed to install Yay packages. You can try running it manually:"
echo "--------------------------------------------------------------------" echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm"
exit 1 # exit with an error echo "--------------------------------------------------------------------"
fi echo "+ sleep 10" && sleep 10
cd $PreviousWD
rm -rf /tmp/yay_install
else
echo "Yay is already installed."
fi
# Install yay packages
# Runs local script unless it does no exist or fails
if [[ -f "./config/PackagesYay.txt" ]]; then
echo "Found local config"
cat ./config/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm
elif ! curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm; then
echo "--------------------------------------------------------------------"
echo "Failed to install Yay packages. You can try running it manually:"
echo "curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/configs/PackagesYay.txt | yay -S --needed --save --answerclean None --answerdiff None - --noconfirm"
echo "--------------------------------------------------------------------"
echo "+ sleep 10" && sleep 10
fi
fi fi
;; ;;
"6")
echo "Installing GUI dependencies"
if command -v pacman </dev/null; then
echo "Pacman found"
sudo pacman -S python-pyqt6 --noconfirm --needed
fi
if command -v dnf </dev/null; then
echo "dnf found"
sudo dnf install python3-pyqt6
fi
if command -v apt </dev/null; then
echo "apt found"
sudo apt install python3-pyqt6 -y
fi
echo "Install affinity with ryzendew's gui installer"
echo "You must manually select to install in the GUI"
echo "Github repo: https://github.com/ryzendew/Linux-Affinity-Installer"
echo "+ 10 sleep"
sleep 10
curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py | python3
;;
*) *)
echo "Invalid option selected: $selection" echo "Invalid option selected: $selection"
;; ;;
+25 -15
View File
@@ -32,19 +32,18 @@ function error_handler() {
# Trap errors # Trap errors
trap error_handler ERR trap error_handler ERR
#Install prerequisites # Install prerequisites
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
if command -v pacman >/dev/null; then if command -v pacman >/dev/null; then
echo "pacman detected. Installing prerequisites" 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 fi
if command -v apt >/dev/null; then if command -v apt >/dev/null; then
echo "apt detected. Installing prerequisites" echo "apt detected. Installing prerequisites"
sudo apt update sudo apt update
sudo apt full-upgrade -y 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 fi
# Ensure whiptail is installed # Ensure whiptail is installed
@@ -77,12 +76,13 @@ fi
# Options for the whiptail menu # Options for the whiptail menu
OPTIONS=( OPTIONS=(
1 "Run zsh setup script" ON 1 "Run zsh setup script" OFF
2 "Run LazyVim setup script" OFF 2 "Run fish setup script (NOT CREATED)" ON
3 "Install Docker" OFF 3 "Run LazyVim setup script" OFF
4 "Install Pacman Packages" ON 4 "Install Docker" OFF
5 "Install Yay and AUR Packages" ON 5 "Install Pacman Packages" ON
6 "Install affinity with GUI" OFF 6 "Install Yay and AUR Packages" ON
7 "Install affinity with GUI" OFF
) )
CHOICE=$(whiptail --title "Installation Options" --checklist \ 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 bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark
fi 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..." echo "Running LazyVim setup script..."
# Runs local script unless it does not exist or fails # Runs local script unless it does not exist or fails
if [[ -f "LazyVim.sh" ]];then 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 curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/LazyVim.sh | bash
fi fi
;; ;;
"3") "4")
echo "Installing Docker..." echo "Installing Docker..."
if ! command -v docker >/dev/null; then if ! command -v docker >/dev/null; then
echo "docker is NOT installed. Installing..." echo "docker is NOT installed. Installing..."
@@ -136,7 +146,7 @@ for selection in $CHOICE; do
echo "+ sleep 10" && sleep 10 echo "+ sleep 10" && sleep 10
fi fi
;; ;;
"4") "5")
echo "Installing Pacman Packages..." echo "Installing Pacman Packages..."
# Check if pacman binary is installed # Check if pacman binary is installed
if command -v pacman </dev/null; then if command -v pacman </dev/null; then
@@ -156,7 +166,7 @@ for selection in $CHOICE; do
echo "+ sleep 10" && sleep 10 echo "+ sleep 10" && sleep 10
fi fi
;; ;;
"5") "6")
echo "Installing Yay and Yay Packages..." echo "Installing Yay and Yay Packages..."
# Check for pacman before installing yay # Check for pacman before installing yay
if command -v pacman </dev/null; then if command -v pacman </dev/null; then
@@ -205,7 +215,7 @@ for selection in $CHOICE; do
echo "+ sleep 10" && sleep 10 echo "+ sleep 10" && sleep 10
fi fi
;; ;;
"6") "7")
echo "Installing GUI dependencies" echo "Installing GUI dependencies"
if command -v pacman </dev/null; then if command -v pacman </dev/null; then
echo "Pacman found" echo "Pacman found"