commit 635977515ff84ed3e891db3ec2daf0fdb9a4f994 parent 0b956b5346e5c9152c02979724567c2bbeac7ccf Author: William Casarin <jb55@jb55.com> Date: Sat, 19 Sep 2020 04:57:22 -0700 bin: update browser Diffstat:
M | bin/browser | | | 21 | ++++++++++++++------- |
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/bin/browser b/bin/browser @@ -1,15 +1,22 @@ #!/usr/bin/env bash #exec chrome "$@" +set -e + +#BROWSER=chromium +BROWSER=qutebrowser +BROWSER_ARGS="--enable-webengine-inspector" + kill_browser () { - exec pkill qutebrowser - #exec pkill --oldest chromium + #exec pkill qutebrowser + pkill --oldest "$BROWSER" + exit 0 } -if [ "$1" == "kill" ]; then - kill_browser +if [ "$1" = "kill" ]; then + kill_browser fi -#exec chrome "$@" -qutebrowser --enable-webengine-inspector "$@" -exec wmctrl -a qutebrowser +"$BROWSER" "$BROWSER_ARGS" "$@" +#qutebrowser --enable-webengine-inspector "$@" +exec wmctrl -a "$BROWSER"