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