some script changes
This commit is contained in:
parent
dda8583988
commit
deecc50f62
1 changed files with 42 additions and 7 deletions
49
install.sh
49
install.sh
|
@ -8,6 +8,8 @@ LIGHT_GREEN='\033[0;92m'
|
||||||
BOLD='\033[1m'
|
BOLD='\033[1m'
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
pkgOption=""
|
||||||
|
|
||||||
echo_error() {
|
echo_error() {
|
||||||
printf "${BOLD}${RED}ERROR: ${NC}${RED}%s${NC}\n" "$1" >&2
|
printf "${BOLD}${RED}ERROR: ${NC}${RED}%s${NC}\n" "$1" >&2
|
||||||
}
|
}
|
||||||
|
@ -151,6 +153,11 @@ askThings() {
|
||||||
read -r askFilemgr </dev/tty
|
read -r askFilemgr </dev/tty
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d ./dotfiles/.config/tmux/ ] && [ ! -d ./dotfiles/.config/zellij/ ]; then
|
||||||
|
echo_info "Choose a cli multiplexer - [t]mux || [z]ellij || [n]one"
|
||||||
|
read -r askMultiPlexer </dev/tty
|
||||||
|
fi
|
||||||
|
|
||||||
echo_info "Do you also want to install optional packages? (y/n)"
|
echo_info "Do you also want to install optional packages? (y/n)"
|
||||||
read -r askOptional </dev/tty
|
read -r askOptional </dev/tty
|
||||||
|
|
||||||
|
@ -176,9 +183,39 @@ cloneDots() {
|
||||||
__validate__() {
|
__validate__() {
|
||||||
if askThings; then
|
if askThings; then
|
||||||
case "$askFilemgr" in
|
case "$askFilemgr" in
|
||||||
[yY] | yazi) cloneDots "yazi" ;;
|
[yY] | yazi)
|
||||||
[rR] | ranger) cloneDots "ranger" ;;
|
cloneDots "yazi"
|
||||||
[lL] | lf) cloneDots "lf" ;;
|
if command_exists curl; then
|
||||||
|
curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/yazi.sh | bash
|
||||||
|
else
|
||||||
|
echo_warning "curl was not found, could not install yazi!"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
[rR] | ranger)
|
||||||
|
cloneDots "ranger"
|
||||||
|
pkgOption="${pkgOption:ranger}"
|
||||||
|
;;
|
||||||
|
[lL] | lf)
|
||||||
|
cloneDots "lf"
|
||||||
|
pkgOption="${pkgOption:lf}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$askMultiPlexer" in
|
||||||
|
[tT] | tmux)
|
||||||
|
cloneDots "tmux"
|
||||||
|
pkgOption="${pkgOption:tmux}"
|
||||||
|
;;
|
||||||
|
[zZ] | zellij)
|
||||||
|
cloneDots "zellij"
|
||||||
|
if ! command_exists zellij; then
|
||||||
|
if command_exists curl; then
|
||||||
|
curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/zellij.sh | bash
|
||||||
|
else
|
||||||
|
echo_warning "curl was not found, could not install zellij!"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo_error "Something went terribly wrong"
|
echo_error "Something went terribly wrong"
|
||||||
|
@ -237,9 +274,6 @@ pkg_optional() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! command_exists zellij; then
|
|
||||||
curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/zellij.sh | bash
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo default
|
echo default
|
||||||
|
@ -281,8 +315,9 @@ main() {
|
||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
[ "$__optional__" == 'true' ] &&
|
if $__optional__; then
|
||||||
pkg_optional
|
pkg_optional
|
||||||
|
fi
|
||||||
|
|
||||||
# __monitors__
|
# __monitors__
|
||||||
# echo_note "found resolution ${res}"
|
# echo_note "found resolution ${res}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue