From 58fbda80ef73e4afd89432fab908888314ca7950 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 6 Aug 2025 15:19:53 +0200 Subject: [PATCH] Only attempt operation if a package name is selected --- bin/omarchy-pkg-install | 8 ++++++-- bin/omarchy-pkg-remove | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/omarchy-pkg-install b/bin/omarchy-pkg-install index 099f1b1d..b407e35c 100755 --- a/bin/omarchy-pkg-install +++ b/bin/omarchy-pkg-install @@ -1,5 +1,9 @@ #!/bin/bash -yay -Slq | fzf --multi --preview 'yay -Sii {1}' --preview-window=down:75% | xargs -ro yay -S --noconfirm && sudo updatedb +pkg_name=$(yay -Slq | fzf --multi --preview 'yay -Sii {1}' --preview-window=down:75%) -~/.local/share/omarchy/bin/omarchy-show-done +if [[ -n "$pkg_name" ]]; then + yay -Sy --noconfirm "$pkg_name" + sudo updatedb + ~/.local/share/omarchy/bin/omarchy-show-done +fi diff --git a/bin/omarchy-pkg-remove b/bin/omarchy-pkg-remove index 9780fa66..c9286c2e 100755 --- a/bin/omarchy-pkg-remove +++ b/bin/omarchy-pkg-remove @@ -1,5 +1,9 @@ #!/bin/bash -yay -Qqe | fzf --multi --preview 'yay -Qi {1}' --preview-window=down:75% | xargs -ro yay -Rns --noconfirm && sudo updatedb +pkg_name=$(yay -Qqe | fzf --multi --preview 'yay -Qi {1}' --preview-window=down:75%) -~/.local/share/omarchy/bin/omarchy-show-done +if [[ -n "$pkg_name" ]]; then + yay -Rns --noconfirm "$pkg_name" + sudo updatedb + ~/.local/share/omarchy/bin/omarchy-show-done +fi