Last active
February 23, 2022 23:51
-
-
Save maks/b01117095d8dc9a2d8c953156a7f0773 to your computer and use it in GitHub Desktop.
**VERY BASIC AND LIMITED** pwa workaround for firefox from script found on: https://www.reddit.com/r/linuxquestions/comments/omsgqd/alternative_to_nativefier/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Usage: | |
# ./firetron <name> <url> | |
# ./firetron hulu hulu.com | |
firefox -CreateProfile "$1" | |
cd "$HOME/.local/share/icons/hicolor/32x32/apps/" || exit | |
wget -O $1.png $2/favicon.ico | |
touch "$HOME/.local/share/applications/$1.desktop" | |
echo "[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Exec=firefox -p $1 -url=$2 | |
Name=$1 | |
Icon=$HOME/.local/share/icons/hicolor/32x32/apps/$1.png | |
Categories=Network" | sudo tee -a "$HOME/.local/share/applications/$1.desktop" | |
cd $HOME/.mozilla/firefox/"$(grep 'Path=' ~/.mozilla/firefox/profiles.ini | sed s/^Path=// | grep "$1")" || exit | |
touch user.js | |
echo 'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);'>> user.js | |
mkdir chrome | |
cd chrome || exit | |
touch userChrome.css | |
echo ' | |
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
#TabsToolbar {visibility: collapse;} | |
#navigator-toolbox {visibility: collapse;} | |
browser {margin-right: -14px; margin-bottom: -14px;}' >> userChrome.css |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment