diff --git a/bin/omarchy-agent-usage-update b/bin/omarchy-agent-usage-update index 8cbfac2e..fe452855 100755 --- a/bin/omarchy-agent-usage-update +++ b/bin/omarchy-agent-usage-update @@ -16,7 +16,7 @@ flags=() only=() declare -A excluded -while [[ $# -gt 0 ]]; do +while (( $# > 0 )); do case "$1" in --force | --limits-only) flags+=("$1") ;; --except) diff --git a/bin/omarchy-chromium-ytdlp-host b/bin/omarchy-chromium-ytdlp-host index aba03ba4..49160240 100755 --- a/bin/omarchy-chromium-ytdlp-host +++ b/bin/omarchy-chromium-ytdlp-host @@ -116,7 +116,7 @@ main() { local length payload url # Detached worker: this is what actually runs yt-dlp and fires notifications. - if [[ "${1:-}" == "--download" ]]; then + if [[ ${1:-} == "--download" ]]; then download_url "$2" fi diff --git a/bin/omarchy-launch-screensaver b/bin/omarchy-launch-screensaver index afee404b..c66c41da 100755 --- a/bin/omarchy-launch-screensaver +++ b/bin/omarchy-launch-screensaver @@ -2,10 +2,6 @@ # omarchy:summary=Launch the Omarchy screensaver in the default terminal on the system with the correct font configuration. -if omarchy-cmd-missing ttfx; then - exit 1 -fi - # Exit early if screensaver is already running pgrep -f '[o]rg.omarchy.screensaver' && exit 0 diff --git a/bin/omarchy-network-status b/bin/omarchy-network-status index b03df3bb..e97c6a29 100755 --- a/bin/omarchy-network-status +++ b/bin/omarchy-network-status @@ -34,23 +34,18 @@ print_status() { return fi - if omarchy-cmd-present nmcli; then - nm=$(nmcli -t -f GENERAL.STATE,GENERAL.CONNECTION dev show "$device" 2>/dev/null) - state=$(awk -F: '$1 == "GENERAL.STATE" { print $2; exit }' <<<"$nm") - ssid=$(awk -F: '$1 == "GENERAL.CONNECTION" { print $2; exit }' <<<"$nm") - signal=$(nmcli -t -f IN-USE,SIGNAL dev wifi list ifname "$device" --rescan no 2>/dev/null | awk -F: '$1 == "*" { print $2; exit }') - freq=$(iw dev "$device" link 2>/dev/null | awk '/freq:/ { print $2; exit }') + nm=$(nmcli -t -f GENERAL.STATE,GENERAL.CONNECTION dev show "$device" 2>/dev/null) + state=$(awk -F: '$1 == "GENERAL.STATE" { print $2; exit }' <<<"$nm") + ssid=$(awk -F: '$1 == "GENERAL.CONNECTION" { print $2; exit }' <<<"$nm") + signal=$(nmcli -t -f IN-USE,SIGNAL dev wifi list ifname "$device" --rescan no 2>/dev/null | awk -F: '$1 == "*" { print $2; exit }') + freq=$(iw dev "$device" link 2>/dev/null | awk '/freq:/ { print $2; exit }') - if [[ $state != 100* ]]; then - printf 'disconnected\t\t\t\n' - return - fi - - printf 'wifi\t%s\t%s\t%s\n' "${ssid:-$device}" "$signal" "$freq" + if [[ $state != 100* ]]; then + printf 'disconnected\t\t\t\n' return fi - printf 'wifi\t%s\t\t\n' "$device" + printf 'wifi\t%s\t%s\t%s\n' "${ssid:-$device}" "$signal" "$freq" } ping_latency_ms() { diff --git a/bin/omarchy-remove-dev-env b/bin/omarchy-remove-dev-env index 4551f1e1..a24e7f9e 100755 --- a/bin/omarchy-remove-dev-env +++ b/bin/omarchy-remove-dev-env @@ -10,7 +10,7 @@ if [[ -z $1 ]]; then fi remove_php() { - sudo pacman -Rns --noconfirm php composer php-sqlite xdebug 2>/dev/null || true + omarchy-pkg-drop php composer php-sqlite xdebug } case "$1" in @@ -50,7 +50,7 @@ laravel) ;; symfony) echo -e "Removing Symfony CLI...\n" - sudo pacman -Rns --noconfirm symfony-cli 2>/dev/null || true + omarchy-pkg-drop symfony-cli ;; python) echo -e "Removing Python...\n" diff --git a/bin/omarchy-transcode-ascii b/bin/omarchy-transcode-ascii index e105a7ed..0ce19acf 100755 --- a/bin/omarchy-transcode-ascii +++ b/bin/omarchy-transcode-ascii @@ -101,11 +101,6 @@ if [[ ! -f $image_path ]]; then exit 1 fi -if omarchy-cmd-missing magick; then - echo "ImageMagick is required to convert logo images" >&2 - exit 1 -fi - if [[ $mode == "braille" ]]; then pixel_width=$((width * 2)) pixel_height=$((height * 4))