#!/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