aboutsummaryrefslogtreecommitdiff
path: root/X
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-04-27 20:52:14 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-04-27 20:52:14 +1200
commitd97cbe7a1f7e18f9357eadce606de399d14f9c00 (patch)
tree463e0b4ec7cb3b8c696e6b32ef5cc32d83599507 /X
parentLowercase default td(1df) directory (diff)
downloaddotfiles-d97cbe7a1f7e18f9357eadce606de399d14f9c00.tar.gz
dotfiles-d97cbe7a1f7e18f9357eadce606de399d14f9c00.zip
Refine browser selection logic
We'll resort to Firefox if it's there and LibreWolf isn't
Diffstat (limited to 'X')
-rw-r--r--X/xinitrc.d/browser.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/X/xinitrc.d/browser.sh b/X/xinitrc.d/browser.sh
index b88724bf..024075d6 100644
--- a/X/xinitrc.d/browser.sh
+++ b/X/xinitrc.d/browser.sh
@@ -1,8 +1,10 @@
# Choose a GUI browser with some rough heuristics
-# If LibreWolf is available, start by assuming that
+# If LibreWolf or failing that Firefox is available, start by assuming that
if command -v librewolf >/dev/null 2>&1 ; then
BROWSER=librewolf
+elif command -v firefox >/dev/null 2>&1 ; then
+ BROWSER=firefox
fi
# Consider a switch to Dillo...
@@ -10,10 +12,10 @@ if (
# No output, please
exec >/dev/null 2>&1
# Don't switch if it's not there
- command -v dillo || exit
- # Switch if LibreWolf isn't there
- command -v librewolf || exit 0
- # Switch if procfs says we have less than 2GB of RAM
+ command -v dillo || exit 1
+ # Do switch if neither LibreWolf nor Firefox are there
+ command -v librewolf || command -v firefox || exit 0
+ # Do switch if procfs says we have less than 2GB of RAM
awk '$1=="MemTotal:"&&$2<2^20{m++}END{exit!m}' < /proc/meminfo
) ; then
BROWSER=dillo