]> git.sev.monster Git - dotfiles.git/commitdiff
replace which with command, remove ref to .fehbg
authorsev <git@sev.monster>
Mon, 14 Jun 2021 09:44:43 +0000 (04:44 -0500)
committersev <git@sev.monster>
Mon, 14 Jun 2021 09:44:43 +0000 (04:44 -0500)
try to replace which with command -v where possible
fix issue where rotate calls .fehbg, use bin/wall instead

bin/.check-busybox
bin/pinentry
bin/rotate

index f8223197bf2c72f20c671534e95cc637b5d763ba..48abb8d7482e9dcc71392b8134ed39d5081c9ac1 100644 (file)
@@ -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")")")" ]
 }
index 3101bc6d6cbc85813264ae08e8f610611655027b..0bd1062bddde4ee4a6b99a7edb1ebf5d682e3397 100755 (executable)
@@ -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
index a902580a6ce91149e88f147a15f66d9710b1d95b..16e9eaf3b3541651a76ca6b9259d27e753623feb 100755 (executable)
@@ -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
This page took 0.042987 seconds and 4 git commands to generate.