ffwa-twitter 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/sh
  2. APP=ffwa-twitter
  3. APPNAME="Twitter"
  4. ICONURL="https://portable-linux-apps.github.io/icons/$APP.png"
  5. # CREATING THE DIRECTORY
  6. mkdir /opt/"$APP"
  7. cd /opt/"$APP"
  8. # ADD THE REMOVER
  9. echo '#!/bin/sh' >> /opt/"$APP"/remove
  10. echo "rm -R -f /usr/local/share/applications/$APP-AM.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/"$APP"/remove
  11. chmod a+x /opt/"$APP"/remove
  12. # LINK
  13. cat >> /usr/local/bin/"$APP" << 'EOF'
  14. #!/bin/sh
  15. sh -c 'XAPP_FORCE_GTKWINDOW_ICON=/opt/ffwa-twitter/icons/ffwa-twitter firefox --class WebApp-twitter --profile /opt/ffwa-twitter --no-remote -url 'https://twitter.com''
  16. EOF
  17. chmod a+x /usr/local/bin/"$APP"
  18. # LAUNCHER
  19. echo "[Desktop Entry]
  20. Name=$APPNAME
  21. Exec=$APP
  22. Icon=/opt/$APP/icons/$APP
  23. Type=Application
  24. Terminal=false
  25. Categories=Network;
  26. Comment=Web Application & Firefox Profile for $APPNAME" > /usr/local/share/applications/"$APP"-AM.desktop
  27. # ICON
  28. mkdir /opt/"$APP"/icons
  29. wget "$ICONURL" -O /opt/"$APP"/icons/"$APP"
  30. # ADD PREFERENCES
  31. cat >> /opt/"$APP"/prefs.js << 'EOF'
  32. // Mozilla User Preferences
  33. // DO NOT EDIT THIS FILE.
  34. //
  35. // If you make changes to this file while the application is running,
  36. // the changes will be overwritten when the application exits.
  37. //
  38. // To change a preference value, you can either:
  39. // - modify it via the UI (e.g. via about:config in the browser); or
  40. // - set it within a user.js file in your profile.
  41. user_pref("app.normandy.first_run", false);
  42. user_pref("browser.bookmarks.addedImportButton", true);
  43. user_pref("browser.bookmarks.restore_default_bookmarks", false);
  44. user_pref("browser.laterrun.enabled", true);
  45. user_pref("browser.shell.checkDefaultBrowser", false);
  46. user_pref("browser.shell.didSkipDefaultBrowserCheckOnFirstRun", true);
  47. user_pref("browser.startup.couldRestoreSession.count", 2);
  48. user_pref("browser.tabs.inTitlebar", 1);
  49. user_pref("browser.toolbars.bookmarks.visibility", "never");
  50. 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}");
  51. user_pref("browser.urlbar.placeholderName", "DuckDuckGo");
  52. user_pref("doh-rollout.doneFirstRun", true);
  53. user_pref("extensions.pendingOperations", false);
  54. EOF