This commit is contained in:
pika 2025-06-21 12:01:16 +02:00
parent cc64488d48
commit 5bffe114a8

View file

@ -48,21 +48,17 @@ __pre_stow__() {
conf="$HOME/.config"
bak_dir="$HOME/.bak"
dirs=(
"$terminal"
"$bar"
"$menu"
"$filemgr"
"$plexer"
"btop"
"gBar"
"fastfetch"
"foot"
"hypr"
"tmux"
"kitty"
"neovide"
"rofi"
"tofi"
"waybar"
"wlogout"
"wob"
"yazi"
"zellij"
)
if [ ! -d "$bak_dir" ]; then
@ -105,26 +101,23 @@ __pre_stow__() {
askThings() {
if [ ! -d ./dotfiles/.config/tmux/ ] && [ ! -d ./dotfiles/.config/zellij/ ]; then
choose plexer "Choose a menu" tmux zellij none </dev/tty
# read -r askMultiPlexer </dev/tty
choose plexer "Choose a multiplexer" tmux zellij none </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
if [ ! -d ./dotfiles/.config/rofi/ ] && [ ! -d ./dotfiles/.config/fuzzel/ ] && [ ! -d ./dotfiles/.config/tofi/ ]; then
choose menu "Choose a menu" rofi tofi fuzzel none </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 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 none </dev/tty
choose bar "Choose a bar provider" waybar gbar hyprpanel quickshell none </dev/tty
else
choose bar "Choose a bar provider" waybar gbar none </dev/tty
fi
@ -133,7 +126,6 @@ askThings() {
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 none </dev/tty
# read -r askTerminal </dev/tty
fi
[ "$terminal" == "none" ] && terminal="kitty"
@ -141,38 +133,26 @@ askThings() {
if confirm "Do you also want to install optional packages?" </dev/tty; then
__optional__=true
fi
# read -r askOptional </dev/tty
if ! command_exists nvim; then
if confirm "Do you also want to install neovim" </dev/tty; then
neovim=true
if confirm "Do you also want to install a neovide config?" </dev/tty; then
neovide=true
fi
else
neovim=false
fi
fi
}
ask_Neovide() {
pen bold blue "Do you also want to install a neovide config? [y/N]"
read -r askNeovide </dev/tty
case "$askNeovide" in
[yY])
cloneDots "neovide"
neovide="true"
;;
esac
}
instPika() {
# if ! command_exists "$1"; then
if command_exists curl; then
curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | bash
else
pen bold yellow "curl was not found, could not install $1!"
fi
# fi
}
cloneDots() {
@ -317,7 +297,7 @@ c_fonts() {
local dirFonts="$HOME/.local/share/fonts/"
local fontsRepo="https://git.k4li.de/pika/fonts.git"
if [[ ! -d "$dirFonts" ]]; then
if confirm "Seems like you may miss some fonts.. Do you want to clone them now into $(pen blue bold $HOME/.local/share/fonts)" </dev/tty; then
if confirm "Seems like you may miss some fonts.. Do you want to clone them now into $(pen blue bold $dirFonts)" </dev/tty; then
if ! command_exists git; then
spin "Installing dependencies.."
if run --err err --out out pkg-install git; then
@ -332,7 +312,7 @@ c_fonts() {
else
spin bold yellow "Cloning fonts from $fontsRepo"
if run --err err --out out git clone --depth=1 https://git.k4li.de/pika/fonts.git "$dirFonts"; then
if run --err err --out out git clone --depth=1 "$fontsRepo" "$dirFonts"; then
upclear
check "Cloned fonts correctly!"
else