aboutsummaryrefslogtreecommitdiff
path: root/firefox-dev
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-19 10:31:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-19 10:31:23 -0300
commit3db31ccb7149b1d45317786df37e26d5232125dd (patch)
treeabe67015622898f20ab094368af902812b4fae12 /firefox-dev
parent083a41a2c2cdf7fe5d8299e12c443683c6790a2b (diff)
downloadfirefoxer-3db31ccb7149b1d45317786df37e26d5232125dd.tar.gz
firefoxer-3db31ccb7149b1d45317786df37e26d5232125dd.tar.bz2
Populate
Diffstat (limited to 'firefox-dev')
-rwxr-xr-xfirefox-dev54
1 files changed, 54 insertions, 0 deletions
diff --git a/firefox-dev b/firefox-dev
new file mode 100755
index 0000000..b04714c
--- /dev/null
+++ b/firefox-dev
@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# Wrapper around firefox developer edition
+#
+
+# Parameters
+DIRNAME="`dirname $0`"
+
+if [ -e "$HOME/.local/bin/firefox-dev" ]; then
+ # Manually or hoarder installed
+ $HOME/.local/bin/firefox-dev
+elif which hoarder &> /dev/null; then
+ hoarder install firefox-dev && $HOME/.local/bin/firefox-dev
+elif which flatpak &> /dev/null; then
+ if ! flatpak list | grep -q ^org.mozilla.FirefoxDevEdition; then
+ # Install
+ sudo flatpak install -y --from https://firefox-flatpak.mojefedora.cz/org.mozilla.FirefoxDevEdition.flatpakref
+
+ # 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
+ # https://elementaryos.stackexchange.com/questions/6796/why-does-firefox-keep-creating-a-desktop-folder
+ # https://superuser.com/questions/1266254/prevent-firefox-from-creating-desktop-folder
+ # http://docs.flatpak.org/en/latest/working-with-the-sandbox.html
+ # https://www.mankier.com/1/flatpak-override
+ while ! [ -d "$HOME/Desktop" ]; do
+ sleep 2
+ done
+
+ rmdir $HOME/Desktop $HOME/Downloads &> /dev/null
+ fi
+else
+ # Install flatpak
+ sudo apt install flatpak -y
+
+ # Run this script again
+ $0
+fi