1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #!/usr/bin/env bash
- APP=ffwa-SAMPLE
- APPNAME="GIVEMEANAME"
- ICONURL="YOURICONURL"
- # CREATING THE FOLDER
- mkdir /opt/"$APP"
- cd /opt/"$APP"
- # ADD THE REMOVER
- echo '#!/bin/sh' >> /opt/"$APP"/remove
- echo "rm -R -f /usr/local/share/applications/$APP-AM.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/$APP/remove
- chmod a+x /opt/"$APP"/remove
- # LINK
- cat >> /usr/local/bin/"$APP" << 'EOF'
- #!/bin/sh
- sh -c 'XAPP_FORCE_GTKWINDOW_ICON=/opt/ffwa-SAMPLE/icons/ffwa-SAMPLE firefox --class WebApp-SAMPLE --profile /opt/ffwa-SAMPLE --no-remote -url 'MYWEBSITE''
- EOF
- chmod a+x /usr/local/bin/"$APP"
- # LAUNCHER
- echo "[Desktop Entry]
- Name=$APPNAME
- Exec=$APP
- Icon=/opt/$APP/icons/$APP
- Type=Application
- Terminal=false
- Categories=YOURCATEGORY;
- Comment=Web Application & Firefox Profile for $APPNAME" > /usr/local/share/applications/"$APP"-AM.desktop
- # ICON
- mkdir /opt/"$APP"/icons
- wget "$ICONURL" -O /opt/"$APP"/icons/"$APP"
- # ADD PREFERENCES
- cat >> /opt/"$APP"/prefs.js << 'EOF'
- // Mozilla User Preferences
- // DO NOT EDIT THIS FILE.
- //
- // If you make changes to this file while the application is running,
- // the changes will be overwritten when the application exits.
- //
- // To change a preference value, you can either:
- // - modify it via the UI (e.g. via about:config in the browser); or
- // - set it within a user.js file in your profile.
- user_pref("app.normandy.first_run", false);
- user_pref("browser.bookmarks.addedImportButton", true);
- user_pref("browser.bookmarks.restore_default_bookmarks", false);
- user_pref("browser.laterrun.enabled", true);
- user_pref("browser.shell.checkDefaultBrowser", false);
- user_pref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun", true);
- user_pref("browser.startup.couldRestoreSession.count", 2);
- user_pref("browser.tabs.inTitlebar", 1);
- user_pref("browser.toolbars.bookmarks.visibility", "never");
- user_pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"customizableui-special-spring1\",\"urlbar-container\",\"customizableui-special-spring2\",\"save-to-pocket-button\",\"downloads-button\",\"fxa-toolbar-menu-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"import-button\",\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":17,\"newElementCount\":2}");
- user_pref("browser.urlbar.placeholderName", "DuckDuckGo");
- user_pref("doh-rollout.doneFirstRun", true);
- user_pref("extensions.pendingOperations", false);
- EOF
|