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