diff options
-rw-r--r-- | X/xsession.d/browser.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/X/xsession.d/browser.sh b/X/xsession.d/browser.sh index 024075d6..44afc78e 100644 --- a/X/xsession.d/browser.sh +++ b/X/xsession.d/browser.sh @@ -1,16 +1,14 @@ # Choose a GUI browser with some rough heuristics # If LibreWolf or failing that Firefox is available, start by assuming that -if command -v librewolf >/dev/null 2>&1 ; then +if command -v librewolf ; then BROWSER=librewolf -elif command -v firefox >/dev/null 2>&1 ; then +elif command -v firefox ; then BROWSER=firefox -fi +fi >/dev/null 2>&1 # Consider a switch to Dillo... if ( - # No output, please - exec >/dev/null 2>&1 # Don't switch if it's not there command -v dillo || exit 1 # Do switch if neither LibreWolf nor Firefox are there @@ -19,7 +17,7 @@ if ( awk '$1=="MemTotal:"&&$2<2^20{m++}END{exit!m}' < /proc/meminfo ) ; then BROWSER=dillo -fi +fi >/dev/null 2>&1 # Export our choice of browser, if it isn't empty [ -n "$BROWSER" ] || return |