diff --git a/hyprpanel.sh b/hyprpanel.sh index d8f4f1b..877bdd9 100644 --- a/hyprpanel.sh +++ b/hyprpanel.sh @@ -16,8 +16,8 @@ command_exists() { # CAUTION: # 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.. -getImports() { - i="https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh" +source-script() { + i="https://git.k4li.de/scripts/imports/raw/branch/main/dream.sh" import="$(mktemp)" if command_exists curl; then curl -fsSL $i -o $import @@ -29,7 +29,6 @@ getImports() { source "$import" sleep 0.3 rm "$import" - echo_warning "cleaned $import" } main() { @@ -43,19 +42,28 @@ main() { case "$distro" in arch) - local deps="brightnessctl" - _install "$deps" - _install ags-hyprpanel-git + local deps="brightnessctl ags-hyprpanel-git" + pkg-install $deps + pkg-install ags-hyprpanel-git ;; *) echo_error "$distro is not supported by this script. Exiting now!" return 69 ;; esac - clone_to_ags } -if getImports; then +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 + local dream=https://git.k4li.de/scripts/imports/raw/branch/main/dream.sh + + if ! command_exists pkg-install && ! command_exists check-and-install && ! command_exists spin; then + source-script $dream + fi +} + +if setup-env; then # ─< package variable >─────────────────────────────────────────────────────────────────── unset PACKAGE