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
|
||||
if [ -f "$HOME/$_f" ]; then
|
||||
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
|
||||
done
|
||||
|
||||
for _d in ".zsh .tmux .fzf"; do
|
||||
if [ -d "$HOME/$_d" ]; then
|
||||
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
|
||||
done
|
||||
}
|
||||
|
@ -99,33 +99,36 @@ askThings() {
|
|||
choose plexer "Choose a menu" tmux zellij none </dev/tty
|
||||
# read -r askMultiPlexer </dev/tty
|
||||
fi
|
||||
[ "$plexer" == "none" ] && plexer=""
|
||||
|
||||
if [ ! -d ./dotfiles/.config/rofi/ ] && [ ! -d ./dotfiles/.config/tofi/ ]; then
|
||||
choose menu "Choose a menu" rofi tofi none </dev/tty
|
||||
# read -r askMenu </dev/tty
|
||||
fi
|
||||
[ "$menu" == "none" ] && menu=""
|
||||
|
||||
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
|
||||
fi
|
||||
[ "$filemgr" == "none" ] && filemgr=""
|
||||
|
||||
if [ ! -d ./dotfiles/.config/waybar/ ] && [ ! -d ./dotfiles/.config/gBar/ ] && [ ! -d ./dotfiles/.config/hyprpanel/ ]; then
|
||||
if $arch; then
|
||||
choose bar "Choose a bar provider" waybar gbar hyprpanel </dev/tty
|
||||
# read -r askBar </dev/tty
|
||||
choose bar "Choose a bar provider" waybar gbar hyprpanel none </dev/tty
|
||||
else
|
||||
choose bar "Choose a bar provider" waybar gbar </dev/tty
|
||||
choose bar "Choose a bar provider" waybar gbar none </dev/tty
|
||||
fi
|
||||
fi
|
||||
[ "$bar" == "none" ] && bar=""
|
||||
|
||||
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
|
||||
fi
|
||||
[ "$terminal" == "none" ] && terminal="kitty"
|
||||
|
||||
__optional__=false
|
||||
|
||||
if confirm "Do you also want to install optional packages?" </dev/tty; then
|
||||
__optional__=true
|
||||
fi
|
||||
|
@ -142,7 +145,7 @@ askThings() {
|
|||
}
|
||||
|
||||
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
|
||||
|
||||
case "$askNeovide" in
|
||||
|
@ -158,7 +161,7 @@ instPika() {
|
|||
if command_exists curl; then
|
||||
curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | bash
|
||||
else
|
||||
echo_warning "curl was not found, could not install $1!"
|
||||
pen bold yellow "curl was not found, could not install $1!"
|
||||
fi
|
||||
# fi
|
||||
}
|
||||
|
@ -189,7 +192,7 @@ __validate__() {
|
|||
[[ -n "$terminal" ]] && cloneDots "$terminal"
|
||||
|
||||
else
|
||||
echo_error "Something went terribly wrong"
|
||||
echo-error "Something went terribly wrong"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@ -246,7 +249,7 @@ __dep__() {
|
|||
if ! command_exists "$hyprdots_dependency"; then
|
||||
# echo_note "--- 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
|
||||
check bold green "$hyprdots_dependency - $(pen yellow bold already installed)"
|
||||
fi
|
||||
|
@ -288,7 +291,7 @@ __stow__() {
|
|||
|
||||
run --err err stow --verbose --target="$HOME" --defer=.gitmodules --restow */ && check "Linked dotfiles!" ||
|
||||
throw "Could not use stow to link dofiles.." &&
|
||||
echo_error "${err:-}"
|
||||
echo-error "${err:-}"
|
||||
}
|
||||
|
||||
c_fonts() {
|
||||
|
@ -306,7 +309,7 @@ c_fonts() {
|
|||
|
||||
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])
|
||||
else
|
||||
|
@ -326,7 +329,7 @@ c_wallpapers() {
|
|||
run pkg-install git && check "Installed git!" || throw "Couldn't install git!" && return 69
|
||||
fi
|
||||
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
|
||||
pen bold red "All right, be sure to checkout the $HOME/.config/hypr/.scripts/random_swww.sh to change the wallpaper dir"
|
||||
return 0
|
||||
|
@ -351,23 +354,17 @@ mkdirs() {
|
|||
}
|
||||
|
||||
setup-env() {
|
||||
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 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 dream=https://git.k4li.de/scripts/imports/raw/branch/main/dream.sh
|
||||
|
||||
if ! command_exists pkg-install && ! command_exists checkAndInstall; then
|
||||
source-script $pika
|
||||
fi
|
||||
|
||||
if ! command_exists pen && ! command_exists spin; then
|
||||
source-script $beddu
|
||||
if ! command_exists pkg-install && ! command_exists check-and-install && ! command_exists spin; then
|
||||
source-script $dream
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
local err
|
||||
|
||||
# check_root
|
||||
# get_packager
|
||||
local err out
|
||||
|
||||
__validate__
|
||||
__dep__
|
||||
|
@ -379,10 +376,11 @@ main() {
|
|||
line
|
||||
spin grey "Installing stow now.."
|
||||
if run --err err pkg-install stow; then
|
||||
upclear
|
||||
check "Stow was installed correctly!"
|
||||
else
|
||||
check "Error while installing stow!"
|
||||
echo_error "${err:-}"
|
||||
upclear
|
||||
throw-err
|
||||
fi
|
||||
else
|
||||
pen red bold "You cannot proceed without installing stow! Please install manually"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue