From ac0482bf7e4ef711653472ca821e765d3b50fa91 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 12 May 2025 15:55:43 +0200 Subject: [PATCH] wip --- hyprland.sh | 30 +++++++++++++++++------------- template.sh | 25 +++++++++++++++---------- zellij.sh | 5 +++-- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/hyprland.sh b/hyprland.sh index 58ce58d..4f72bf9 100644 --- a/hyprland.sh +++ b/hyprland.sh @@ -248,17 +248,21 @@ main() { checkConfig } -if getImports; then - case "$1" in - --silent | -s) - echo_info "Executing main silently.." - silent=true - ;; - *) silent=false ;; - esac -fi +setup() { + if getImports; then + case "$@" in + --silent | -s) + echo_info "Executing script silently.." + silent=true + ;; + *) silent=false ;; + esac + fi +} -checkEnv -askThings -main -instCustom +if setup "$@"; then + checkEnv + askThings + main + instCustom +fi diff --git a/template.sh b/template.sh index 0448ade..38a74c1 100644 --- a/template.sh +++ b/template.sh @@ -100,16 +100,21 @@ esac } - if getImports; then - case "$@" in - --silent | -s) - silent=true - echo_warning "Running script silently!" - ;; - *) - silent=false - ;; - esac + setup() { + if getImports; then + case "$@" in + --silent | -s) + silent=true + echo_warning "Running script silently!" + ;; + *) + silent=false + ;; + esac + fi + } + + if setup; then getDependencies main