firefox-link/README.md
2016-05-24 02:29:02 -04:00

41 lines
1.7 KiB
Markdown

# firefox-link
A sane default Firefox profile
- Comes with uBlock Origin
- Telemetry/error reporting disabled
- Yahoo/Bing search removed, Google set to default
- New tab page "Enhanced" mode disabled
## Installation
### Mac
```bash
NAME=$RANDOM
git clone https://austenwares.com/gogs/stonewareslord/firefox-link "$HOME/Library/Application Support/Firefox/Profiles/$NAME"
egrep -q '\[Profile\d+\]' "$HOME/Library/Application Support/Firefox/profiles.ini"
if (( $? == 0 )); then
printf "\n[Profile$(expr 1 + $(cat "$HOME/Library/Application Support/Firefox/profiles.ini" | egrep '\[Profile\d+\]' | tail -n1 | sed -e 's/\[Profile//' -e 's/\]//'))]\nName=firefox-link\nIsRelative=1\nPath=Profiles/$NAME">>"$HOME/Library/Application Support/Firefox/profiles.ini"
else
mkdir -p "$HOME/Library/Application Support/Firefox/"
printf "\n[Profile0]\nName=firefox-link\nIsRelative=1\nPath=Profiles/$NAME">>"$HOME/Library/Application Support/Firefox/profiles.ini"
fi
'/Applications/Firefox.app/Contents/MacOS/firefox' -p
```
### Linux
```bash
NAME=$RANDOM
git clone https://austenwares.com/gogs/stonewareslord/firefox-link ~/.mozilla/firefox/$NAME
grep -qP '\[Profile\d+\]' ~/.mozilla/firefox/profiles.ini 2>&1 >/dev/null
if (( $? == 0 )); then
printf "\n[Profile$(expr 1 + $(cat ~/.mozilla/firefox/profiles.ini | grep -P '\[Profile\d+\]' ~/.mozilla/firefox/profiles.ini | tail -n1 | sed -e 's/\[Profile//' -e 's/\]//'))]\nName=firefox-link\nIsRelative=1\nPath=$NAME">>~/.mozilla/firefox/profiles.ini
else
mkdir -p ~/.mozilla/firefox
printf "\n[Profile0]\nName=firefox-link\nIsRelative=1\nPath=$NAME">>~/.mozilla/firefox/profiles.ini
fi
if command -v firefox 2>&1 /dev/null; then
firefox -p
else
firefox-bin -p
fi
```