diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-07-19 10:31:23 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-07-19 10:31:23 -0300 |
commit | 3db31ccb7149b1d45317786df37e26d5232125dd (patch) | |
tree | abe67015622898f20ab094368af902812b4fae12 /firefox-profile | |
parent | 083a41a2c2cdf7fe5d8299e12c443683c6790a2b (diff) | |
download | firefoxer-3db31ccb7149b1d45317786df37e26d5232125dd.tar.gz firefoxer-3db31ccb7149b1d45317786df37e26d5232125dd.tar.bz2 |
Populate
Diffstat (limited to 'firefox-profile')
-rwxr-xr-x | firefox-profile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/firefox-profile b/firefox-profile new file mode 100755 index 0000000..34380f2 --- /dev/null +++ b/firefox-profile @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Wrapper around firefox +# + +# Parameters +BASE="$HOME/.mozilla/firefox" +PROFILES="$BASE/profiles" + +# Check +if ! which firefox &> /dev/null; then + echo "Please install firefox" + exit 1 +fi + +# Dispatch +if [ ! -z "$1" ] && [ "$1" == "private" ]; then + firefox -private-window +elif [ ! -z "$1" ]; then + if [ ! -d "$PROFILES/$1" ]; then + firefox -no-remote -CreateProfile "$1 $PROFILES/$1" + + if [ -d "$PROFILES/template" ] && [ "$1" != "template" ]; then + rm -rf $PROFILES/$1 && cp -a $PROFILES/template $PROFILES/$1 + fi + fi + + firefox -p $1 -new-instance & +else + firefox --profilemanager -new-instance & +fi |