summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bashrc/common/browser.sh19
1 files changed, 9 insertions, 10 deletions
diff --git a/bashrc/common/browser.sh b/bashrc/common/browser.sh
index 1f610f0..7dc6bd2 100644
--- a/bashrc/common/browser.sh
+++ b/bashrc/common/browser.sh
@@ -1,13 +1,12 @@
# browser options
-# but user opera, if available
-if hash opera > /dev/null 2>&1 ; then
- export BROWSER=opera
-else
-
- # use firefox by default ...
- if hash firefox > /dev/null 2>&1 ; then
- export BROWSER=firefox
- fi
-fi
+# check in this order for existence and use the first available
+browser="x-www-browser opera chromium google-chrome firefox"
+
+for b in $browser ; do
+ if hash $b > /dev/null 2>&1 ; then
+ export BROWSER=$b
+ break
+ fi
+done