-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathffwa-gmail
68 lines (54 loc) · 2.66 KB
/
ffwa-gmail
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
APP=ffwa-gmail
APPNAME="Gmail"
ICONURL="https://portable-linux-apps.github.io/icons/$APP.png"
# CREATING THE DIRECTORY
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-gmail/icons/ffwa-gmail firefox --class WebApp-gmail --profile /opt/ffwa-gmail --no-remote -url 'https://mail.google.com''
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=Network;
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