From a5daf7a91306aff631a7df22a6f856c82cef2131 Mon Sep 17 00:00:00 2001 From: sev Date: Mon, 14 Jun 2021 04:44:43 -0500 Subject: [PATCH] replace which with command, remove ref to .fehbg try to replace which with command -v where possible fix issue where rotate calls .fehbg, use bin/wall instead --- bin/.check-busybox | 2 +- bin/pinentry | 2 +- bin/rotate | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/.check-busybox b/bin/.check-busybox index f822319..48abb8d 100644 --- a/bin/.check-busybox +++ b/bin/.check-busybox @@ -1,4 +1,4 @@ #!/bin/sh function check-busybox() { - which $1 >/dev/null 2>&1 && [ "$(basename "$(readlink -f "$(which "$1" | head -1)")")" = "busybox" ] + command -v "$1" >/dev/null 2>&1 && [ "busybox" = "$(basename "$(readlink -f "$(command -v "$1")")")" ] } diff --git a/bin/pinentry b/bin/pinentry index 3101bc6..0bd1062 100755 --- a/bin/pinentry +++ b/bin/pinentry @@ -11,7 +11,7 @@ case "${PINENTRY_USER_DATA-}" in esac for x in $list; do - p=`which "pinentry-$x"` 2>/dev/null + p=$(command -v "pinentry-$x") 2>/dev/null if [ $? = 0 ]; then exec "$p" "$@" fi diff --git a/bin/rotate b/bin/rotate index a902580..16e9eaf 100755 --- a/bin/rotate +++ b/bin/rotate @@ -69,11 +69,11 @@ num_to_rot $((($rot0 + 4) % 4)) xrandr --output $output --rotation $rot1 # x220t -if which xsetwacom >/dev/null 2>&1; then +if command -v xsetwacom >/dev/null 2>&1; then xsetwacom --set stylus Rotate $rot2 xsetwacom --set eraser Rotate $rot2 xsetwacom --set touch Rotate $rot2 fi # reload bg -~/.fehbg +~/bin/wall -- 2.47.0