-# remove local/bin from path
-# https://stackoverflow.com/a/2108540
-tmp=:$PATH:
-del=/usr/local/bin
-tmp=${tmp//:$del:/:}
-tmp=${tmp%:}
-tmp=${tmp#:}
-PATH=$tmp
# prefer abrowser
-if type -P abrowser &>/dev/null; then
+if [[ -x /usr/bin/abrowser ]]; then
b=abrowser
else
b=firefox
fi
-$b "$@"
+# avoid our wrapper in /usr/local/bin
+/usr/bin/$b "$@"
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR
-# remove local/bin from path
-# https://stackoverflow.com/a/2108540
-tmp=:$PATH:
-del=/usr/local/bin
-tmp=${tmp//:$del:/:}
-tmp=${tmp%:}
-tmp=${tmp#:}
-PATH=$tmp
# prefer abrowser
-if type -P abrowser &>/dev/null; then
+if [[ -x /usr/bin/abrowser ]]; then
b=abrowser
else
b=firefox
i3-msg "workspace 2"
i3-split-maybe
- $b "$@" &
+ # avoid our wrapper in /usr/local/bin
+ /usr/bin/$b "$@" &
# on a fast computer, .5 is too fast, 1 is ok. on x200, 2 is ok if the computer isn't busy.
for (( i=0; i < 15; i++ )); do
# i3-msg "[con_mark=\"abrowser\"] focus"
# fi
-
fi