]>
Commit | Line | Data |
---|---|---|
763f73fd | 1 | #!/bin/sh |
2 | # based on script by (c) vip at linux.pl, wolf at pld-linux.org | |
3 | ||
f594d491 MK |
4 | if [ `arch` == "x86_64" ]; then |
5 | LIBDIR="/usr/lib64/mozilla-firefox" | |
6 | else | |
7 | LIBDIR="/usr/lib/mozilla-firefox" | |
8 | fi | |
9 | ||
10 | MOZILLA_FIVE_HOME=$LIBDIR | |
763f73fd | 11 | if [ "$1" == "-remote" ]; then |
f594d491 | 12 | $LIBDIR/firefox "$@" |
763f73fd | 13 | else |
f594d491 | 14 | PING=`$LIBDIR/firefox -remote 'ping()' 2>&1 >/dev/null` |
763f73fd | 15 | if [ -n "$PING" ]; then |
16 | if [ -f "`pwd`/$1" ]; then | |
f594d491 | 17 | $LIBDIR/firefox "file://`pwd`/$1" |
763f73fd | 18 | else |
f594d491 | 19 | $LIBDIR/firefox "$@" |
763f73fd | 20 | fi |
21 | else | |
22 | if [ -z "$1" ]; then | |
f594d491 | 23 | $LIBDIR/firefox -remote 'xfeDoCommand (openBrowser)' |
763f73fd | 24 | elif [ "$1" == "-mail" ]; then |
f594d491 | 25 | $LIBDIR/firefox -remote 'xfeDoCommand (openInbox)' |
763f73fd | 26 | elif [ "$1" == "-compose" ]; then |
f594d491 | 27 | $LIBDIR/firefox -remote 'xfeDoCommand (composeMessage)' |
763f73fd | 28 | else |
29 | if [ -f "`pwd`/$1" ]; then | |
30 | URL="file://`pwd`/$1" | |
31 | else | |
32 | URL="$1" | |
33 | fi | |
34 | grep browser.tabs.opentabfor.middleclick ~/.mozilla/firefox/*/prefs.js | grep true > /dev/null | |
35 | if [ 0 -eq 0 ]; then | |
f594d491 | 36 | $LIBDIR/firefox -remote "OpenUrl($URL,new-tab)" |
763f73fd | 37 | else |
f594d491 | 38 | $LIBDIR/firefox -remote "OpenUrl($URL,new-window)" |
763f73fd | 39 | fi |
40 | fi | |
41 | fi | |
42 | fi |