testing more beautiful approach

This commit is contained in:
pika 2025-05-21 18:19:50 +02:00
parent 04867a7def
commit e73cb59941

View file

@ -60,84 +60,75 @@ checkEnv() {
} }
askThings() { askThings() {
echo_note "Do you want to install hyprland? (y/N)" # if ! command_exists waybar && ! command_exists hyprpanel && ! command_exists gBar; then
read -r askHyprland </dev/tty choose bar "Choose a bar.." waybar hyprpanel gBar
case "$askHyprland" in # read -r askBar </dev/tty
[yY]) ;; # case "$askBar" in
*) # [Ww] | waybar)
echo_error "Aborting now!" # bar="waybar"
exit 69 # ;;
;; # [Hh] | hyprpanel)
esac # if $debian; then
# echo_warning "hyprpanel is not available for $distro"
# echo_warning "the script automatically chose gBar for you instead.."
# bar="gBar"
# else
# bar="hyprpanel"
# fi
# ;;
# [Gg] | gBar | gbar)
# bar="gBar"
# ;;
# esac
# echo_info "Set bar to $bar"
# fi
if ! command_exists waybar && ! command_exists hyprpanel && ! command_exists gBar; then # if ! command_exists rofi && ! command_exists tofi; then
echo_note "What bar do you want to install? (available: [w]aybar, [h]yprpanel, [g]Bar)" choose menu "Choose a menu.." rofi tofi
read -r askBar </dev/tty # read -r askRofi </dev/tty
case "$askBar" in # case "$askRofi" in
[Ww] | waybar) # [tT] | tofi)
bar="waybar" # menu="tofi"
;; # ;;
[Hh] | hyprpanel) # [rR] | rofi)
if $debian; then # menu="rofi"
echo_warning "hyprpanel is not available for $distro" # ;;
echo_warning "the script automatically chose gBar for you instead.." # *)
bar="gBar" # menu="rofi"
else # ;;
bar="hyprpanel" # esac
fi # echo_info "Set menu to $menu"
;; # fi
[Gg] | gBar | gbar)
bar="gBar"
;;
esac
echo_info "Set bar to $bar"
fi
if ! command_exists rofi && ! command_exists tofi; then # echo_note "What terminal to you want to install? [a]lacritty, [f]oot, [k]itty, [w]ezterm"
echo_note "Do you want to install [r]ofi or [t]ofi?: " choose terminal "Choose a menu.." alacritty foot kitty wezterm
read -r askRofi </dev/tty # read -r askTerminal </dev/tty
case "$askRofi" in # case "$askTerminal" in
[tT] | tofi) # [aA] | alacritty)
menu="tofi" # terminal="alacritty"
;; # ;;
[rR] | rofi) # [fF] | foot)
menu="rofi" # terminal="foot"
;; # ;;
*) # [kK] | kitty)
menu="rofi" # terminal="kitty"
;; # ;;
esac # [wW] | wezterm)
echo_info "Set menu to $menu" # terminal="wezterm"
fi # ;;
# *)
echo_note "What terminal to you want to install? [a]lacritty, [f]oot, [k]itty, [w]ezterm" # terminal="foot"
read -r askTerminal </dev/tty # ;;
case "$askTerminal" in # esac
[aA] | alacritty) # echo_info "Set terminal to $terminal"
terminal="alacritty"
;;
[fF] | foot)
terminal="foot"
;;
[kK] | kitty)
terminal="kitty"
;;
[wW] | wezterm)
terminal="wezterm"
;;
*)
terminal="foot"
;;
esac
echo_info "Set terminal to $terminal"
advDeps=( advDeps=(
${menu:-rofi} "${menu:-rofi}"
${terminal:-foot} "${terminal:-foot}"
$bar "$bar"
hyprshot "hyprshot"
hyprlock "hyprlock"
swww "swww"
) )
} }
@ -172,11 +163,12 @@ instCustom() {
cloneDotfiles() { cloneDotfiles() {
echo_info "Which dotfiles do you want to clone? ([p]ika's config, or just type the link to your own repo)" echo_info "Which dotfiles do you want to clone? ([p]ika's config, or just type the link to your own repo)"
read -r askDotfiles2 </dev/tty choose askDotfiles2 "What dotfiles do you want to choose?" "pika's" own none
# read -r askDotfiles2 </dev/tty
case "$askDotfiles2" in case "$askDotfiles2" in
[pP]) "pika's")
echo_info "Cloning pika's config..." echo_info "Cloning pika's config..."
run git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git "$HOME/git/hyprdots" || { echo_error "Failed to clone dotfiles!" && exit 1; } run git clone --recursive --depth=1 https://git.k4li.de/dotfiles/hyprdots.git "$HOME/dotfiles" || { echo_error "Failed to clone dotfiles!" && exit 1; }
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; } cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
@ -185,14 +177,20 @@ cloneDotfiles() {
echo_info "Dotfiles installed successfully!" echo_info "Dotfiles installed successfully!"
;; ;;
*) own)
echo_info "Cloning dotfiles from $askDotfiles2..." request customDots "Type in the url of your hyprland dotfiles:"
git clone --recursive --depth=1 $askDotfiles2 $HOME/git/hyprdots git clone --recursive --depth=1 $customDots "$HOME/dotfiles" || { echo_error "Failed to clone dotfiles!" && exit 1; }
# *)
cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; } # echo_info "Cloning dotfiles from $askDotfiles2..."
# git clone --recursive --depth=1 $askDotfiles2 $HOME/git/hyprdots
echo_info "Your dotfiles have been saved to $HOME/git/hyprdots" #
echo_info "You can now install your dotfiles how you want to!" # cd $HOME/git/hyprdots || { echo_error "Failed to clone dotfiles!" && exit 1; }
#
# echo_info "Your dotfiles have been saved to $HOME/git/hyprdots"
# echo_info "You can now install your dotfiles how you want to!"
;;
none)
return
;; ;;
esac esac
} }
@ -308,6 +306,8 @@ main() {
} }
if getImports; then if getImports; then
source-script "https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh"
# ─< package variable >─────────────────────────────────────────────────────────────────── # ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE unset PACKAGE