]> git.pld-linux.org Git - packages/firefox.git/commitdiff
- nice wrapper to run firefox, based on script from mozilla.spec
authormaho <maho@pld-linux.org>
Mon, 11 Oct 2004 20:18:27 +0000 (20:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mozilla-firefox.sh -> 1.1

mozilla-firefox.sh [new file with mode: 0644]

diff --git a/mozilla-firefox.sh b/mozilla-firefox.sh
new file mode 100644 (file)
index 0000000..96b867f
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+# based on script by (c) vip at linux.pl, wolf at pld-linux.org
+
+MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
+if [ "$1" == "-remote" ]; then
+       /usr/lib/mozilla-firefox/firefox "$@"
+else
+       PING=`/usr/lib/mozilla-firefox/firefox -remote 'ping()' 2>&1 >/dev/null`
+       if [ -n "$PING" ]; then
+               if [ -f "`pwd`/$1" ]; then
+                       /usr/lib/mozilla-firefox/firefox "file://`pwd`/$1"
+               else
+                       /usr/lib/mozilla-firefox/firefox "$@"
+               fi
+       else
+               if [ -z "$1" ]; then
+                       /usr/lib/mozilla-firefox/firefox -remote 'xfeDoCommand (openBrowser)'
+               elif [ "$1" == "-mail" ]; then
+                       /usr/lib/mozilla-firefox/firefox -remote 'xfeDoCommand (openInbox)'
+               elif [ "$1" == "-compose" ]; then
+                       /usr/lib/mozilla-firefox/firefox -remote 'xfeDoCommand (composeMessage)'
+               else
+                       if [ -f "`pwd`/$1" ]; then
+                               URL="file://`pwd`/$1"
+                       else
+                               URL="$1"
+                       fi
+                       grep browser.tabs.opentabfor.middleclick ~/.mozilla/firefox/*/prefs.js | grep true > /dev/null
+                       if [ 0 -eq 0 ]; then
+                               /usr/lib/mozilla-firefox/firefox -remote "OpenUrl($URL,new-tab)"
+                       else
+                               /usr/lib/mozilla-firefox/firefox -remote "OpenUrl($URL,new-window)"
+                       fi
+               fi
+       fi
+fi
This page took 0.685068 seconds and 4 git commands to generate.