aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-07 12:17:20 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-07 12:17:20 -0300
commit091ba179a178550596c0647629bff10c7387bcb7 (patch)
tree48cbc1040cfd15c4240142abc5be99f75f2aa7d9
parent34ef41d6dd8a26074973a288de0c0ed530db4d25 (diff)
downloadutils-x11-091ba179a178550596c0647629bff10c7387bcb7.tar.gz
utils-x11-091ba179a178550596c0647629bff10c7387bcb7.tar.bz2
Tridactyl support for firefox-dev
-rwxr-xr-xfirefox-dev16
1 files changed, 16 insertions, 0 deletions
diff --git a/firefox-dev b/firefox-dev
index d1c8134..2ff555a 100755
--- a/firefox-dev
+++ b/firefox-dev
@@ -3,6 +3,9 @@
# Wrapper around firefox
#
+# Parameters
+DIRNAME="`dirname $0`"
+
if which flatpak &> /dev/null; then
if ! flatpak list | grep -q ^org.mozilla.FirefoxDevEdition; then
# Install
@@ -11,6 +14,19 @@ if which flatpak &> /dev/null; then
# Run this script again
$0
else
+ # Check and set tridactyl
+ if [ -e "$DIRNAME/../tridactyl/native/tridactyl.json" ]; then
+ native="$HOME/.mozilla/native-messaging-hosts/"
+
+ if [ ! -e "$native/tridactyl.json" ]; then
+ mkdir -p $native
+
+ tridactyl="`cd $DIRNAME/../tridactyl/native/ &> /dev/null && pwd`"
+ cp $tridactyl/tridactyl.json $native
+ sed -i -e "s|REPLACE_ME_WITH_SED|$tridactyl/native_main.py|g" $native/tridactyl.json
+ fi
+ fi
+
flatpak run org.mozilla.FirefoxDevEdition &
# Woraround while we dont fix this issue