From a23d2a4b8a39fea9ef1500ee6da85dc34cf03257 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 22 Feb 2025 22:44:26 +1100 Subject: install: all subcommand --- completions/caelestia.fish | 2 +- main.fish | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/completions/caelestia.fish b/completions/caelestia.fish index 5a5cbd4..8b9ed7b 100644 --- a/completions/caelestia.fish +++ b/completions/caelestia.fish @@ -22,7 +22,7 @@ complete -c caelestia -n $not_seen -a 'wallpaper' -d 'Change the wallpaper' complete -c caelestia -n $not_seen -a 'pip' -d 'Picture in picture utilities' # Install -set -l commands discord foot fuzzel hypr safeeyes scripts shell gtk vscode +set -l commands all discord foot fuzzel hypr safeeyes scripts shell gtk vscode complete -c caelestia -n "$seen install && not $seen $commands" -a "$commands" # Shell diff --git a/main.fish b/main.fish index 5ff66ad..da590f2 100755 --- a/main.fish +++ b/main.fish @@ -45,7 +45,13 @@ end if test "$argv[1]" = install set -l valid_modules discord foot fuzzel hypr safeeyes scripts shell gtk vscode - contains -- "$argv[2]" $valid_modules && $src/install/$argv[2].fish $argv[3..] || error "Invalid module: $argv[2]" + if test "$argv[2]" = all + for module in $valid_modules + $src/install/$module.fish $argv[3..] + end + else + contains -- "$argv[2]" $valid_modules && $src/install/$argv[2].fish $argv[3..] || error "Invalid module: $argv[2]" + end exit end -- cgit v1.2.3-freya