wip
This commit is contained in:
parent
4467dcd82e
commit
a9923b4795
1 changed files with 27 additions and 29 deletions
56
install.sh
56
install.sh
|
@ -82,14 +82,14 @@ __pre_stow__() {
|
||||||
for _f in "${h_files[@]}"; do
|
for _f in "${h_files[@]}"; do
|
||||||
if [ -f "$HOME/$_f" ]; then
|
if [ -f "$HOME/$_f" ]; then
|
||||||
pen "moved $_f"
|
pen "moved $_f"
|
||||||
mv -f "$HOME/$_f" "$bak_dir" && echo_info "Moved $_f to $bak_dir"
|
mv -f "$HOME/$_f" "$bak_dir" && pen bold blue "Moved $_f to $bak_dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for _d in ".zsh .tmux .fzf"; do
|
for _d in ".zsh .tmux .fzf"; do
|
||||||
if [ -d "$HOME/$_d" ]; then
|
if [ -d "$HOME/$_d" ]; then
|
||||||
pen "moved $_d"
|
pen "moved $_d"
|
||||||
mv -f "$HOME/$_d" "$bak_dir" && echo_info "Moved $_d to $bak_dir"
|
mv -f "$HOME/$_d" "$bak_dir" && pen bold blue "Moved $_d to $bak_dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -99,33 +99,36 @@ askThings() {
|
||||||
choose plexer "Choose a menu" tmux zellij none </dev/tty
|
choose plexer "Choose a menu" tmux zellij none </dev/tty
|
||||||
# read -r askMultiPlexer </dev/tty
|
# read -r askMultiPlexer </dev/tty
|
||||||
fi
|
fi
|
||||||
|
[ "$plexer" == "none" ] && plexer=""
|
||||||
|
|
||||||
if [ ! -d ./dotfiles/.config/rofi/ ] && [ ! -d ./dotfiles/.config/tofi/ ]; then
|
if [ ! -d ./dotfiles/.config/rofi/ ] && [ ! -d ./dotfiles/.config/tofi/ ]; then
|
||||||
choose menu "Choose a menu" rofi tofi none </dev/tty
|
choose menu "Choose a menu" rofi tofi none </dev/tty
|
||||||
# read -r askMenu </dev/tty
|
# read -r askMenu </dev/tty
|
||||||
fi
|
fi
|
||||||
|
[ "$menu" == "none" ] && menu=""
|
||||||
|
|
||||||
if [ ! -d ./dotfiles/.config/yazi/ ] && [ ! -d ./dotfiles/.config/lf/ ] && [ ! -d ./dotfiles/.config/ranger/ ]; then
|
if [ ! -d ./dotfiles/.config/yazi/ ] && [ ! -d ./dotfiles/.config/lf/ ] && [ ! -d ./dotfiles/.config/ranger/ ]; then
|
||||||
choose filemgr "Choose a cli filemanager" yazi ranger lf </dev/tty
|
choose filemgr "Choose a cli filemanager" yazi ranger lf none </dev/tty
|
||||||
# read -r askFilemgr </dev/tty
|
# read -r askFilemgr </dev/tty
|
||||||
fi
|
fi
|
||||||
|
[ "$filemgr" == "none" ] && filemgr=""
|
||||||
|
|
||||||
if [ ! -d ./dotfiles/.config/waybar/ ] && [ ! -d ./dotfiles/.config/gBar/ ] && [ ! -d ./dotfiles/.config/hyprpanel/ ]; then
|
if [ ! -d ./dotfiles/.config/waybar/ ] && [ ! -d ./dotfiles/.config/gBar/ ] && [ ! -d ./dotfiles/.config/hyprpanel/ ]; then
|
||||||
if $arch; then
|
if $arch; then
|
||||||
choose bar "Choose a bar provider" waybar gbar hyprpanel </dev/tty
|
choose bar "Choose a bar provider" waybar gbar hyprpanel none </dev/tty
|
||||||
# read -r askBar </dev/tty
|
|
||||||
else
|
else
|
||||||
choose bar "Choose a bar provider" waybar gbar </dev/tty
|
choose bar "Choose a bar provider" waybar gbar none </dev/tty
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
[ "$bar" == "none" ] && bar=""
|
||||||
|
|
||||||
if [ ! -d ./dotfiles/.config/foot/ ] && [ ! -d ./dotfiles/.config/ghostty/ ] && [ ! -d ./dotfiles/.config/alacritty/ ] && [ ! -d ./dotfiles/.config/kitty/ ]; then
|
if [ ! -d ./dotfiles/.config/foot/ ] && [ ! -d ./dotfiles/.config/ghostty/ ] && [ ! -d ./dotfiles/.config/alacritty/ ] && [ ! -d ./dotfiles/.config/kitty/ ]; then
|
||||||
choose terminal "Choose a Terminal config" alacritty foot ghostty kitty </dev/tty
|
choose terminal "Choose a Terminal config" alacritty foot ghostty kitty none </dev/tty
|
||||||
# read -r askTerminal </dev/tty
|
# read -r askTerminal </dev/tty
|
||||||
fi
|
fi
|
||||||
|
[ "$terminal" == "none" ] && terminal="kitty"
|
||||||
|
|
||||||
__optional__=false
|
__optional__=false
|
||||||
|
|
||||||
if confirm "Do you also want to install optional packages?" </dev/tty; then
|
if confirm "Do you also want to install optional packages?" </dev/tty; then
|
||||||
__optional__=true
|
__optional__=true
|
||||||
fi
|
fi
|
||||||
|
@ -142,7 +145,7 @@ askThings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ask_Neovide() {
|
ask_Neovide() {
|
||||||
echo_info "Do you also want to install a neovide config? [y/N]"
|
pen bold blue "Do you also want to install a neovide config? [y/N]"
|
||||||
read -r askNeovide </dev/tty
|
read -r askNeovide </dev/tty
|
||||||
|
|
||||||
case "$askNeovide" in
|
case "$askNeovide" in
|
||||||
|
@ -158,7 +161,7 @@ instPika() {
|
||||||
if command_exists curl; then
|
if command_exists curl; then
|
||||||
curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | bash
|
curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | bash
|
||||||
else
|
else
|
||||||
echo_warning "curl was not found, could not install $1!"
|
pen bold yellow "curl was not found, could not install $1!"
|
||||||
fi
|
fi
|
||||||
# fi
|
# fi
|
||||||
}
|
}
|
||||||
|
@ -189,7 +192,7 @@ __validate__() {
|
||||||
[[ -n "$terminal" ]] && cloneDots "$terminal"
|
[[ -n "$terminal" ]] && cloneDots "$terminal"
|
||||||
|
|
||||||
else
|
else
|
||||||
echo_error "Something went terribly wrong"
|
echo-error "Something went terribly wrong"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -246,7 +249,7 @@ __dep__() {
|
||||||
if ! command_exists "$hyprdots_dependency"; then
|
if ! command_exists "$hyprdots_dependency"; then
|
||||||
# echo_note "--- installing $hyprdots_dependency ---"
|
# echo_note "--- installing $hyprdots_dependency ---"
|
||||||
spin bold yellow "Installing $hyprdots_dependency.."
|
spin bold yellow "Installing $hyprdots_dependency.."
|
||||||
run --err err pkg-install "$hyprdots_dependency" && check "$hyprdots_dependency installed" || throw "$hyprdots_dependency could not get installed" && echo_error "${err:-}"
|
run --err err pkg-install "$hyprdots_dependency" && check "$hyprdots_dependency installed" || throw "$hyprdots_dependency could not get installed" && echo-error "${err:-}"
|
||||||
else
|
else
|
||||||
check bold green "$hyprdots_dependency - $(pen yellow bold already installed)"
|
check bold green "$hyprdots_dependency - $(pen yellow bold already installed)"
|
||||||
fi
|
fi
|
||||||
|
@ -288,7 +291,7 @@ __stow__() {
|
||||||
|
|
||||||
run --err err stow --verbose --target="$HOME" --defer=.gitmodules --restow */ && check "Linked dotfiles!" ||
|
run --err err stow --verbose --target="$HOME" --defer=.gitmodules --restow */ && check "Linked dotfiles!" ||
|
||||||
throw "Could not use stow to link dofiles.." &&
|
throw "Could not use stow to link dofiles.." &&
|
||||||
echo_error "${err:-}"
|
echo-error "${err:-}"
|
||||||
}
|
}
|
||||||
|
|
||||||
c_fonts() {
|
c_fonts() {
|
||||||
|
@ -306,7 +309,7 @@ c_fonts() {
|
||||||
|
|
||||||
spin "Cloning fonts now.. This might take a while.."
|
spin "Cloning fonts now.. This might take a while.."
|
||||||
|
|
||||||
run --err err git clone --depth=1 https://git.k4li.de/pika/fonts.git "$dirFonts" && check "Cloned fonts correctly!" || throw "Error cloning fonts!" && echo_error "${err:-}"
|
run --err err git clone --depth=1 https://git.k4li.de/pika/fonts.git "$dirFonts" && check "Cloned fonts correctly!" || throw "Error cloning fonts!" && echo-error "${err:-}"
|
||||||
# ;;
|
# ;;
|
||||||
# [Nn])
|
# [Nn])
|
||||||
else
|
else
|
||||||
|
@ -326,7 +329,7 @@ c_wallpapers() {
|
||||||
run pkg-install git && check "Installed git!" || throw "Couldn't install git!" && return 69
|
run pkg-install git && check "Installed git!" || throw "Couldn't install git!" && return 69
|
||||||
fi
|
fi
|
||||||
spin blue bold "Cloning wallpaper repo.. This might take a while.."
|
spin blue bold "Cloning wallpaper repo.. This might take a while.."
|
||||||
run --err err git clone --depth=1 https://git.k4li.de/pika/wallpaper.git "$dirWallpaper" && check bold blue "Wallpapers loaded correctly!" || throw "Error downloading wallpapers!" && echo_error "${err:-}"
|
run --err err git clone --depth=1 https://git.k4li.de/pika/wallpaper.git "$dirWallpaper" && check bold blue "Wallpapers loaded correctly!" || throw "Error downloading wallpapers!" && echo-error "${err:-}"
|
||||||
else
|
else
|
||||||
pen bold red "All right, be sure to checkout the $HOME/.config/hypr/.scripts/random_swww.sh to change the wallpaper dir"
|
pen bold red "All right, be sure to checkout the $HOME/.config/hypr/.scripts/random_swww.sh to change the wallpaper dir"
|
||||||
return 0
|
return 0
|
||||||
|
@ -351,23 +354,17 @@ mkdirs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setup-env() {
|
setup-env() {
|
||||||
local beddu=https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh
|
# local beddu=https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh
|
||||||
local pika=https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh
|
# local pika=https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh
|
||||||
|
local dream=https://git.k4li.de/scripts/imports/raw/branch/main/dream.sh
|
||||||
|
|
||||||
if ! command_exists pkg-install && ! command_exists checkAndInstall; then
|
if ! command_exists pkg-install && ! command_exists check-and-install && ! command_exists spin; then
|
||||||
source-script $pika
|
source-script $dream
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command_exists pen && ! command_exists spin; then
|
|
||||||
source-script $beddu
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
local err
|
local err out
|
||||||
|
|
||||||
# check_root
|
|
||||||
# get_packager
|
|
||||||
|
|
||||||
__validate__
|
__validate__
|
||||||
__dep__
|
__dep__
|
||||||
|
@ -379,10 +376,11 @@ main() {
|
||||||
line
|
line
|
||||||
spin grey "Installing stow now.."
|
spin grey "Installing stow now.."
|
||||||
if run --err err pkg-install stow; then
|
if run --err err pkg-install stow; then
|
||||||
|
upclear
|
||||||
check "Stow was installed correctly!"
|
check "Stow was installed correctly!"
|
||||||
else
|
else
|
||||||
check "Error while installing stow!"
|
upclear
|
||||||
echo_error "${err:-}"
|
throw-err
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
pen red bold "You cannot proceed without installing stow! Please install manually"
|
pen red bold "You cannot proceed without installing stow! Please install manually"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue