From: sev Date: Mon, 14 Jun 2021 09:44:43 +0000 (-0500) Subject: replace which with command, remove ref to .fehbg X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/a5daf7a91306aff631a7df22a6f856c82cef2131?ds=sidebyside 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 --- 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