This commit is contained in:
pika 2025-05-12 14:37:00 +02:00
parent f537219d62
commit ee15506e54
4 changed files with 76 additions and 14 deletions

View file

@ -106,6 +106,8 @@ askThings() {
$bar $bar
$menu $menu
$terminal $terminal
hyprshot
swww
) )
} }
@ -113,10 +115,7 @@ instCustom() {
for _d in "${advDeps[@]}"; do for _d in "${advDeps[@]}"; do
case "$_d" in case "$_d" in
hyprpanel) hyprpanel)
case $distro in eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/hyprpanel.sh)"
arch) run _install ags-hyprpanel-git ;;
*) echo_error "Hyprpanel cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
esac
;; ;;
gBar) gBar)
case $distro in case $distro in
@ -124,6 +123,12 @@ instCustom() {
*) echo_error "gBar cannot be installed for ${YELLOW}${distro}${RED} right now.." ;; *) echo_error "gBar cannot be installed for ${YELLOW}${distro}${RED} right now.." ;;
esac esac
;; ;;
rofi)
eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/rofi.sh)"
;;
swww)
eval "$(curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/swww.sh)"
;;
*) *)
checkAndInstall "$_d" checkAndInstall "$_d"
;; ;;
@ -209,6 +214,8 @@ main() {
exit 1 exit 1
;; ;;
esac esac
checkConfig
} }
if getImports; then if getImports; then

View file

@ -45,11 +45,11 @@
declare -A deps=( declare -A deps=(
[debian]="depsDebian" [debian]="depsDebian"
[ubuntu]="depsUbuntu" [ubuntu]="depsDebian"
[opensuse]="depsOpensuse"
[fedora]="depsFedora" [fedora]="depsFedora"
[arch]="depsArch" [arch]="depsArch"
[alpine]="depsAlpine" [alpine]="depsAlpine"
[opensuse]="depsOpensuse"
) )
declare -n pkgArray="${deps[$distro]}" declare -n pkgArray="${deps[$distro]}"

View file

@ -79,7 +79,9 @@
main() { main() {
local rofiTemp="$(mktemp -d)" local rofiTemp="$(mktemp -d)"
if ! command_exists rofi; then if ! command_exists rofi; then
run git clone --depth=1 https://github.com/A417ya/rofi-wayland "$rofiTemp/rofi" echo_info "Cloning rofi to $rofiTemp/rofi"
git clone --depth=1 https://github.com/A417ya/rofi-wayland "$rofiTemp/rofi"
sleep 0.2 sleep 0.2
@ -94,6 +96,9 @@
ninja -C build install ninja -C build install
fi fi
echo_note "Cleaning up old $rofiTemp directory.."
rm -rf $rofiTemp
} }
if getImports; then if getImports; then

View file

@ -19,20 +19,60 @@
# This only wokrs for generic package names, like neovim, or vim, or tmux etc.. # This only wokrs for generic package names, like neovim, or vim, or tmux etc..
# not every package packagemanager has the same packagenames for their packages.. # not every package packagemanager has the same packagenames for their packages..
getImports() { getImports() {
i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" local url="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh"
import="$(mktemp)" local import="$(mktemp)"
if command_exists curl; then if command_exists curl; then
curl -fsSL $i -o $import curl -fsSL $url -o $import
elif command_exists wget; then
wget -o $import $url
else else
echo "curl is required, but missing.." echo "curl/wget is required, but missing.."
exit 1 exit 69
fi fi
source "$import" source "$import"
sleep 0.3 sleep 0.2
rm "$import" rm "$import"
} }
getDependencies() {
echo_info "Checking build dependencies.."
# INFO:
# ╭─────────────────────────────────────────────────────────────────────────╮
# │ You can define dependencies for various linux distros here. It will │
# │ automagically be pulled via the $pkgArray[$distro] variable │
# ╰─────────────────────────────────────────────────────────────────────────╯
depsDebian=()
depsFedora=()
depsOpensuse=()
depsArch=()
depsAlpine=()
declare -A deps=(
[debian]="depsDebian"
[ubuntu]="depsUbuntu"
[fedora]="depsFedora"
[arch]="depsArch"
[alpine]="depsAlpine"
[opensuse]="depsOpensuse"
)
# INFO:
# ╭────────────────────────────────────────────────────────────────╮
# │ This variable stores the packages you provided for each distro │
# ╰────────────────────────────────────────────────────────────────╯
declare -n pkgArray="${deps[$distro]}"
case "$distro" in
debian | ubuntu | arch | fedora | alpine | opensuse) checkAndInstall "${pkgArray[@]}" ;;
*)
echo_error "Cannot install for $distro"
return 69
;;
esac
}
main() { main() {
case "$distro" in case "$distro" in
arch) arch)
@ -61,6 +101,16 @@
} }
if getImports; then if getImports; then
main case "$@" in
--silent | -s)
silent=true
echo_warning "Running script silently!"
;;
*)
silent=false
;;
esac
getDependencies
main </dev/tty
fi fi
} }