diff options
| author | Robert Günzler <r@gnzler.io> | 2022-02-09 00:25:45 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-02-09 00:25:45 +0100 |
| commit | 3028ccd32642167bbedb87ecb8eb1af6d145a41c (patch) | |
| tree | 4da420256e5a48b141e10f7726bd591988cebb7a /bin | |
| parent | 433949455aef0696db3feeb7b9e1728ebd8ec32f (diff) | |
bin/firefox: detect if we're in a firejail container
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/firefox | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/firefox b/bin/firefox index d49d9af..6352036 100755 --- a/bin/firefox +++ b/bin/firefox @@ -2,6 +2,9 @@ [ -n "$DEBUG" ] && set -x +container=${container:-} +[ "${container}" = "firejail" ] && exec xdg-open "$@" + bin=${FIREFOX_BIN:-/usr/bin/firefox} # enable touch device support @@ -10,21 +13,22 @@ export MOZ_USE_XINPUT2=1 export MOZ_DBUS_REMOTE=1 # enable webrender export MOZ_WEBRENDER=1 +export MOZ_ACCELERATED=1 case "$(basename "$0")" in firefox) - exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@ + exec "${bin}" --profile "$HOME"/.mozilla/firefox/wr7p23up.default-nightly "$@" ;; firefox-private) - exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@ --private-window + exec "${bin}" --profile "$HOME"/.mozilla/firefox/wr7p23up.default-nightly "$@" --private-window ;; firefox-clean) exec firejail \ - --private \ --profile=firefox \ + --tmpfs="$HOME"/.mozilla \ -- \ - "${bin}" --new-instance $@ + "${bin}" --new-instance "$@" ;; workfox) |