summary refs log tree commit diff
path: root/bin/firefox
blob: d49d9af0ccc9c5676ef37313e9d698bb95844fc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

[ -n "$DEBUG" ] && set -x

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

case "$(basename "$0")" in
firefox)
	exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@
	;;
firefox-private)
	exec "${bin}" --profile $HOME/.mozilla/firefox/wr7p23up.default-nightly $@ --private-window
	;;

firefox-clean)
	exec firejail \
		--private \
		--profile=firefox \
		-- \
		"${bin}" --new-instance $@
	;;

workfox)
	set -- "${bin}" --profile "$HOME"/.mozilla/firefox/d2ps1x6l.work "$@"
	if swaymsg -t get_version >/dev/null 2>&1; then
		exec swx -M work -- "$@"
	else
		exec "$@"
	fi
	;;
esac