addet remove function

This commit is contained in:
pika 2025-05-24 12:28:27 +02:00
parent 5c74497d14
commit 7a3541e4c4

View file

@ -56,6 +56,11 @@ askThings() {
pen grey "$terminal was picked"
line
removeUnwanted=false
if confirm "Do you want to also remove conflicting packages?"; then
removeUnwanted=true
fi
advDeps=(
"${menu:-rofi}"
"${terminal:-foot}"
@ -71,22 +76,22 @@ instCustom() {
case "$_d" in
hyprpanel | hyprlock | hyprshot | gBar | rofi | swww)
# eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/hyprpanel.sh)"
source_script https://git.k4li.de/scripts/installs/raw/branch/main/$_d.sh
source-script https://git.k4li.de/scripts/installs/raw/branch/main/$_d.sh
;;
# hyprlock)
# source_script https://git.k4li.de/scripts/installs/raw/branch/main/hyprlock.sh
# source-script https://git.k4li.de/scripts/installs/raw/branch/main/hyprlock.sh
# ;;
# hyprshot)
# source_script https://git.k4li.de/scripts/installs/raw/branch/main/hyprshot.sh
# source-script https://git.k4li.de/scripts/installs/raw/branch/main/hyprshot.sh
# ;;
# gBar)
# source_script https://git.k4li.de/scripts/installs/raw/branch/main/gBar.sh
# source-script https://git.k4li.de/scripts/installs/raw/branch/main/gBar.sh
# ;;
# rofi)
# source_script https://git.k4li.de/scripts/installs/raw/branch/main/rofi.sh
# source-script https://git.k4li.de/scripts/installs/raw/branch/main/rofi.sh
# ;;
# swww)
# source_script https://git.k4li.de/scripts/installs/raw/branch/main/swww.sh
# source-script https://git.k4li.de/scripts/installs/raw/branch/main/swww.sh
# ;;
none)
return
@ -124,6 +129,8 @@ cloneDotfiles() {
pen blue bold "Dotfiles installed successfully!"
;;
own)
pen bold red "Warning: This does only clone the dotfiles into $HOME/dotfiles, you have to install them yourself!"
lin
request customDots "Type in the url of your hyprland dotfiles:" </dev/tty
sleep 1
spin blue bold "Getting your dotfiles from $customDots"
@ -234,6 +241,17 @@ getDependencies() {
esac
}
remove-unwanted() {
local arr=(
mako
nano
dunst
hyprpaper
)
check-and-remove ${arr[@]}
}
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
@ -269,22 +287,26 @@ main() {
askThings
if $silent; then
echo_warning "Executing script silently!"
else
silent=false
pen bold yellow "Executing script silently!"
fi
getDependencies
# remove conflicting packages if the user confirmed it
if $removeUnwanted; then
remove-unwanted
fi
instCustom
if [[ ! -d "$HOME/dotfiles" ]]; then
cloneDotfiles
fi
clone
# clone
# checkConfig
}
if setup-env; then
# ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE