summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-11-02 19:10:33 +0100
committerRobert Günzler <r@gnzler.io>2021-11-02 19:10:33 +0100
commitc285502c804bf7a961629f4a53c7d78c58ea6171 (patch)
tree54c762f667e8040405b3f09e72ab81649b79c427 /bin
parent987a79a17582ba1ebab9e602022ed82eb37e2192 (diff)
Add firefox scripts
Diffstat (limited to 'bin')
-rwxr-xr-xbin/firefox47
l---------bin/firefox-clean1
l---------bin/firefox-private1
l---------bin/workfox1
4 files changed, 32 insertions, 18 deletions
diff --git a/bin/firefox b/bin/firefox
index 79b3c23..1885e19 100755
--- a/bin/firefox
+++ b/bin/firefox
@@ -1,31 +1,42 @@
 #!/bin/sh
 
-set -x
+[ -n "$DEBUG" ] && set -x
 
-bin=${FIREFOX_BIN:-firefox-wayland}
+bin=${FIREFOX_BIN:-/usr/bin/firefox}
 
 # enable touch device support
 export MOZ_USE_XINPUT2=1
+# user dbus remote exclusively
+export MOZ_DBUS_REMOTE=1
+# enable webrender
 export MOZ_WEBRENDER=1
-export XDG_CURRENT_DESKTOP=1
 
 case "$(basename "$0")" in
-    firefox|nightly)
-        exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@ ;;
-    firefox-private)
-        exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@ --private-window ;;
+firefox | nightly)
+	exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@
+	;;
+firefox-private)
+	exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@ --private-window
+	;;
 
-    firefox-kiosk)
-        exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly --ssb $@ ;;
+firefox-kiosk)
+	exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly --ssb $@
+	;;
 
-    firefox-clean)
-        exec firejail \
-            --overlay-tmpfs \
-            --profile=firefox \
-            "${bin}" -P clean --new-instance $@ ;;
+firefox-clean)
+	exec firejail \
+		--private \
+		--profile=firefox \
+		-- \
+		"${bin}" --new-instance $@
+	# "${bin}" -P clean --new-instance $@
+	# --overlay-tmpfs=$HOME/.mozilla \
+	;;
 
-    workfox)
-        swx -M work "${bin}" --profile $HOME/.mozilla/firefox/d2ps1x6l.work $@ ;;
-    workfox-kiosk)
-        swx -M work "${bin}" --profile $HOME/.mozilla/firefox/d2ps1x6l.work --ssb $@ ;;
+workfox)
+	swx -M work -- "${bin}" --profile $HOME/.mozilla/firefox/d2ps1x6l.work $@
+	;;
+workfox-kiosk)
+	swx -M work -- "${bin}" --profile $HOME/.mozilla/firefox/d2ps1x6l.work --ssb $@
+	;;
 esac
diff --git a/bin/firefox-clean b/bin/firefox-clean
new file mode 120000
index 0000000..7c92c5e
--- /dev/null
+++ b/bin/firefox-clean
@@ -0,0 +1 @@
+firefox
\ No newline at end of file
diff --git a/bin/firefox-private b/bin/firefox-private
new file mode 120000
index 0000000..7c92c5e
--- /dev/null
+++ b/bin/firefox-private
@@ -0,0 +1 @@
+firefox
\ No newline at end of file
diff --git a/bin/workfox b/bin/workfox
new file mode 120000
index 0000000..7c92c5e
--- /dev/null
+++ b/bin/workfox
@@ -0,0 +1 @@
+firefox
\ No newline at end of file