changed the layout, should not effect script behaviour

This commit is contained in:
pika 2025-05-19 13:59:53 +02:00
parent 293c4b9965
commit 0997cf8a9c
15 changed files with 386 additions and 294 deletions

View file

@ -123,15 +123,29 @@ main() {
} }
if getImports; then if getImports; then
case "$1" in # ─< package variable >───────────────────────────────────────────────────────────────────
--silent | -s) unset PACKAGE
silent=true
echo_warning "Running the script silently.." # ─< argument list variables >────────────────────────────────────────────────────────────
;;
*)
silent=false silent=false
sleep 0.1
PACKAGE=docker
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;; ;;
esac esac
done
if main; then if main; then
init_docker init_docker

36
gbar.sh
View file

@ -75,6 +75,14 @@
} }
main() { main() {
if $silent; then
echo_warning "Executing script silently!"
fi
if ! getDependencies; then
echo_error "Error when installing dependencies.."
fi
case "$distro" in case "$distro" in
arch) arch)
checkAndInstall gbar-git checkAndInstall gbar-git
@ -108,16 +116,30 @@
} }
if getImports; then if getImports; then
case "$@" in # ─< package variable >───────────────────────────────────────────────────────────────────
--silent | -s) unset PACKAGE
silent=true
echo_warning "Running script silently!" # ─< argument list variables >────────────────────────────────────────────────────────────
;;
*)
silent=false silent=false
sleep 0.1
PACKAGE=gbar
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;; ;;
esac esac
getDependencies done
main </dev/tty main </dev/tty
fi fi
} }

View file

@ -5,30 +5,6 @@ command_exists() {
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprgraphics
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -154,5 +130,29 @@ main() {
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprgraphics
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main main
fi fi

View file

@ -9,30 +9,6 @@ command_exists() {
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprland
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -322,5 +298,29 @@ main() {
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprland
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main main
fi fi

View file

@ -7,30 +7,6 @@ command_exists() {
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprlock
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -222,5 +198,29 @@ main() {
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprlock
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main main
fi fi

View file

@ -32,19 +32,15 @@ getImports() {
echo_warning "cleaned $import" echo_warning "cleaned $import"
} }
if getImports; then
case "$1" in
--silent | -s)
silent=true
echo_warning "Running the script silently.."
;;
*)
silent=false
;;
esac
fi
main() { main() {
if $silent; then
echo_warning "Executing script silently!"
fi
if ! getDependencies; then
echo_error "Error when installing dependencies.."
fi
case "$distro" in case "$distro" in
arch) arch)
local deps="brightnessctl" local deps="brightnessctl"
@ -59,4 +55,30 @@ main() {
clone_to_ags clone_to_ags
} }
main if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprpanel
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main
fi

View file

@ -6,30 +6,6 @@
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprshot
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -129,6 +105,30 @@
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=hyprshot
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main </dev/tty main </dev/tty
fi fi
} }

View file

@ -6,30 +6,6 @@
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=neovim
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -160,6 +136,30 @@
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=neovim
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main </dev/tty main </dev/tty
fi fi

View file

@ -106,6 +106,13 @@
} }
main() { main() {
if $silent; then
echo_warning "Executing script silently!"
fi
if ! getDependencies; then
echo_error "Error when installing dependencies.."
fi
checkDeps checkDeps
instDeps instDeps
getPkgUI getPkgUI
@ -113,16 +120,6 @@
} }
if getImports; then if getImports; then
case "$1" in
--silent | -s)
silent=true
echo_warning "Running the script silently.."
;;
*)
silent=false
;;
esac
fi
main main
fi
} }

View file

@ -148,11 +148,19 @@ _nala() {
main() { main() {
if $silent; then
echo_warning "Executing script silently!"
fi
# Getting general dependencies # Getting general dependencies
getDependencies if ! getDependencies; then
echo_error "Error when installing dependencies.."
fi
# removing 'bloat' # removing 'bloat'
removeBloat if ! removeBloat; then
echo_error "Error when removing bloat.."
fi
case "$distro" in case "$distro" in
debian) debian)
@ -176,14 +184,12 @@ main() {
} }
if getImports; then if getImports; then
case "$@" in # ─< package variable >───────────────────────────────────────────────────────────────────
--silent | -s) unset PACKAGE
silent=true # ─< argument list variables >────────────────────────────────────────────────────────────
echo_warning "Running script silently!"
;;
*)
silent=false silent=false
;;
esac PACKAGE=postinstallation
main main
fi fi

48
rofi.sh
View file

@ -6,30 +6,6 @@
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=rofi
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -139,6 +115,30 @@
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=rofi
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main </dev/tty main </dev/tty
fi fi
} }

48
swww.sh
View file

@ -6,30 +6,6 @@
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=swww
if command_exists "$PACKAGE"; then
echo "$PACKAGE is already installed!"
echo "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -109,6 +85,30 @@
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=swww
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main main
fi fi

View file

@ -6,30 +6,6 @@
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=packagename
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -135,6 +111,30 @@
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=packagename
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main main
fi fi
} }

58
yazi.sh
View file

@ -6,30 +6,6 @@
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1
} }
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=yazi
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
# WHY: # WHY:
# This import will give you the following variables: # This import will give you the following variables:
# _sudo="sudo -E" <- only if non root user # _sudo="sudo -E" <- only if non root user
@ -80,11 +56,11 @@
declare -A deps=( declare -A deps=(
[debian]="depsDebian" [debian]="depsDebian"
[ubuntu]="depsUbuntu" [ubuntu]="depsDebian"
[fedora]="depsFedora" # [fedora]="depsFedora"
[arch]="depsArch" # [arch]="depsArch"
[alpine]="depsAlpine" # [alpine]="depsAlpine"
[opensuse]="depsOpensuse" # [opensuse]="depsOpensuse"
) )
# INFO: # INFO:
@ -179,6 +155,30 @@
} }
if getImports; then if getImports; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE
# ─< argument list variables >────────────────────────────────────────────────────────────
silent=false
sleep 0.1
PACKAGE=yazi
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;;
esac
done
main main
fi fi
} }

View file

@ -75,6 +75,14 @@
} }
main() { main() {
if $silent; then
echo_warning "Executing script silently!"
fi
# if ! getDependencies; then
# echo_error "Error when installing dependencies.."
# fi
case "$distro" in case "$distro" in
arch) arch)
_install zen-browser-bin _install zen-browser-bin
@ -128,29 +136,52 @@
esac esac
} }
setup() { # setup() {
# if getImports; then
# case "$@" in
# --silent | -s)
# silent=true
# echo_warning "Running script silently!"
# ;;
# *)
# silent=false
# ;;
# esac
# fi
#
# if ! command_exists zen-browser; then
# return 0
# else
# echo_error "zen-browser does already exist on this machine!"
# return 69
# fi
# }
if getImports; then if getImports; then
case "$@" in # ─< package variable >───────────────────────────────────────────────────────────────────
--silent | -s) unset PACKAGE
silent=true
echo_warning "Running script silently!" # ─< argument list variables >────────────────────────────────────────────────────────────
;;
*)
silent=false silent=false
sleep 0.1
PACKAGE=zen-browser
if command_exists "$PACKAGE"; then
echo_warning "$PACKAGE is already installed!"
echo_warning "Exiting now!"
exit 69
fi
# ─< parse arguments and get variable contents >──────────────────────────────────────────
for arg in "$@"; do
case "$arg" in
--silent | -s)
export silent=true
;; ;;
esac esac
fi done
if ! command_exists zen-browser; then
return 0
else
echo_error "zen-browser does already exist on this machine!"
return 69
fi
}
if setup "$@"; then
getDependencies
main </dev/tty main </dev/tty
fi fi
} }