-
Notifications
You must be signed in to change notification settings - Fork 2
/
user.js
254 lines (225 loc) · 11.6 KB
/
user.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
// Required for FF Ricing via CSS editing (chrome)
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("svg.context-properties.content.enabled", true);
user_pref("layout.css.has-selector.enabled", true);
// UI
user_pref("browser.compactmode.show", true);
user_pref("layout.css.prefers-color-scheme.content-override", 0); // Force dark mode
user_pref("ui.key.menuAccessKey", 0); // Remove the underscores on Context Menu Items
// Remove native context menus
user_pref("widget.gtk.native-context-menus", false);
user_pref("widget.macos.native-context-menus", false);
user_pref("widget.windows.native-context-menus", false);
// Experimental
// Requires Firefox 128+
// See: <https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/128#experimental_web_features>
user_pref("image.jxl.enabled", true);
// To make Firefox Translations (Addon) better integrate with the UI
user_pref("browser.translation.ui.show", true);
user_pref("browser.translation.detectLanguage", true);
// Region
user_pref("browser.search.region", "US");
user_pref("doh-rollout.home-region", "US");
// Extensions
user_pref("extensions.pocket.enabled", false);
user_pref("extensions.screenshots.disabled", true);
// Recommendations
user_pref("browser.dataFeatureRecommendations.enabled", false);
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false); // Remove 'Recommendations' tab in about:addons
// Devtools
user_pref("devtools.debugger.enabled", true);
user_pref("devtools.debugger.auto-pretty-print", true);
user_pref("devtools.debugger.remote-enabled", true);
// Remove the annoying "Incoming connection" confirmation dialog when opening the Browser Toolbox
user_pref("devtools.debugger.prompt-connection", false);
// Media
user_pref("media.default_volume", "1.0");
user_pref("media.volume_scale", "1.0");
user_pref("media.mediasource.experimental.enabled", true);
user_pref("media.hardwaremediakeys.enabled", true);
user_pref("media.ffmpeg.enabled", true);
user_pref("media.ffmpeg.encoder.enabled", true);
user_pref("media.flac.enabled", true);
user_pref("media.gmp.encoder.enabled", true);
user_pref("media.gmp.encoder.multithreaded", true);
user_pref("media.hls.enabled", true);
user_pref("media.peerconnection.video.denoising", true);
// Warnings
user_pref("browser.aboutConfig.showWarning", false); // disable about:config warning
user_pref("browser.tabs.warnOnClose", true); // enable warning when closing multiple tabs (recommended)
user_pref("browser.tabs.warnOnCloseOtherTabs", true); // enable warning when closing multiple tabs (recommended)
user_pref("browser.tabs.warnOnOpen", true); // enable warning when opening multiple tabs (recommended)
user_pref("browser.warnOnQuit", true); // enable warning when quitting Firefox (recommended)
user_pref("browser.tabs.warnOnCloseOtherTabs", true); // Recommended
// GFX
// Based on: <https://gist.github.com/RubenKelevra/fd66c2f856d703260ecdf0379c4f59db#gfx-rendering-tweaks>
user_pref("gfx.canvas.accelerated", true);
user_pref("gfx.canvas.accelerated.cache-items", 32768);
user_pref("gfx.canvas.accelerated.cache-size", 4096);
// user_pref("layers.acceleration.force-enabled", true);
user_pref("gfx.content.skia-font-cache-size", 80);
user_pref("gfx.webrender.all", true);
user_pref("gfx.webrender.compositor", true);
// user_pref("gfx.webrender.compositor.force-enabled", true);
user_pref("gfx.webrender.enabled", true);
user_pref("gfx.webrender.precache-shaders", true);
user_pref("gfx.webrender.program-binary-disk", true);
user_pref("gfx.webrender.software.opengl", true);
user_pref("image.mem.decode_bytes_at_a_time", 65536);
user_pref("image.mem.shared.unmap.min_expiration_ms", 120000);
user_pref("layers.gpu-process.enabled", true);
// user_pref("layers.gpu-process.force-enabled", true);
user_pref("image.cache.size", 10485760);
user_pref("media.memory_cache_max_size", 1048576);
user_pref("media.memory_caches_combined_limit_kb", 3145728);
// user_pref("media.hardware-video-decoding.force-enabled", true);
user_pref("media.ffmpeg.vaapi.enabled", true);
// findbar (ctrl+f) highlight colors
user_pref("ui.textHighlightBackground", "#8DB8CD");
user_pref("ui.textHighlightForeground", "#ffffff");
user_pref("ui.textSelectAttentionBackground", "#c38f8f");
user_pref("ui.textSelectAttentionForeground", "#ffffff");
user_pref("ui.textSelectDisabledBackground", "#a0a0a0");
// Misc colors
user_pref("browser.visited_color", "#c38f8f");
user_pref("browser.visited_color.dark", "#8a6666");
user_pref("browser.anchor_color", "#40b5bf");
// Misc
user_pref("browser.cache.disk.parent_directory", "/run/user/1000/firefox"); // id -u <username>
user_pref("browser.search.suggest.enabled.private", true);
user_pref("browser.tabs.warnOnClose", true);
user_pref("general.autoScroll", true);
user_pref("layout.frame_rate", -1);
user_pref("browser.uitour.enabled", false);
user_pref("network.notify.checkForProxies", false);
user_pref("network.captive-portal-service.enabled", false);
// URL Bar
user_pref("browser.urlbar.suggest.calculator", true);
user_pref("browser.urlbar.unitConversion.enabled", true);
user_pref("browser.urlbar.trimURLs", true);
// Cache
user_pref("browser.cache.jsbc_compression_level", 3);
// Temporary (For: https://bugzilla.mozilla.org/show_bug.cgi?id=1818517)
user_pref("widget.gtk.ignore-bogus-leave-notify", 1);
// Privacy
user_pref("privacy.globalprivacycontrol.enabled", true);
user_pref("browser.privatebrowsing.vpnpromourl", "");
// Crash Reports
user_pref("breakpad.reportURL", "");
user_pref("browser.tabs.crashReporting.sendReport", false);
user_pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
// Welcome Page
user_pref("browser.aboutwelcome.enabled", false);
user_pref("startup.homepage_welcome_url", "");
user_pref("startup.homepage_welcome_url.additional", "");
user_pref("startup.homepage_override_url", "");
// Optimization
user_pref("network.ssl_tokens_cache_capacity", 32768); // more TLS token caching (fast reconnects)
// Promos
user_pref("browser.vpn_promo.enabled", false);
user_pref("browser.promo.focus.enabled", false);
user_pref("browser.promo.pin.enabled", false);
// Telemetry
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.server", "data:,");
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
user_pref("toolkit.telemetry.updatePing.enabled", false);
user_pref("toolkit.telemetry.bhrPing.enabled", false);
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
user_pref("toolkit.telemetry.coverage.opt-out", true);
user_pref("toolkit.coverage.opt-out", true);
user_pref("toolkit.coverage.endpoint.base", "");
user_pref("browser.ping-centre.telemetry", false);
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);
/* Based on: <https://wiki.archlinux.org/title/Firefox/Tweaks#Smooth_scrolling> */
/*
user_pref("general.smoothScroll.lines.durationMaxMS", 125);
user_pref("general.smoothScroll.lines.durationMinMS", 125);
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 200);
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 100);
user_pref("general.smoothScroll.msdPhysics.enabled", true);
user_pref("general.smoothScroll.other.durationMaxMS", 125);
user_pref("general.smoothScroll.other.durationMinMS", 125);
user_pref("general.smoothScroll.pages.durationMaxMS", 125);
user_pref("general.smoothScroll.pages.durationMinMS", 125);
user_pref("mousewheel.min_line_scroll_amount", 30);
user_pref("mousewheel.system_scroll_override_on_root_content.enabled", true);
user_pref("mousewheel.system_scroll_override_on_root_content.horizontal.factor", 175);
user_pref("mousewheel.system_scroll_override_on_root_content.vertical.factor", 175);
user_pref("toolkit.scrollbox.horizontalScrollDistance", 6);
user_pref("toolkit.scrollbox.verticalScrollDistance", 2);
*/
/* Based on: <https://raw.githubusercontent.com/AveYo/fox/main/Natural%20Smooth%20Scrolling%20for%20user.js> */
/// NATURAL SMOOTH SCROLLING V4 "SHARP"
user_pref("general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS", 12);
user_pref("general.smoothScroll.msdPhysics.enabled", true);
user_pref("general.smoothScroll.msdPhysics.motionBeginSpringConstant", 200);
user_pref("general.smoothScroll.msdPhysics.regularSpringConstant", 250);
user_pref("general.smoothScroll.msdPhysics.slowdownMinDeltaMS", 25);
user_pref("general.smoothScroll.msdPhysics.slowdownMinDeltaRatio", "2.0");
user_pref("general.smoothScroll.msdPhysics.slowdownSpringConstant", 250);
user_pref("general.smoothScroll.currentVelocityWeighting", "1.0");
user_pref("general.smoothScroll.stopDecelerationWeighting", "1.0");
/// adjust multiply factor for mousewheel - or set to false if scrolling is way too fast
user_pref("mousewheel.system_scroll_override.horizontal.factor", 200);
user_pref("mousewheel.system_scroll_override.vertical.factor", 200);
user_pref("mousewheel.system_scroll_override_on_root_content.enabled", true);
user_pref("mousewheel.system_scroll_override.enabled", true);
/// Adjust pixels at a time count for mousewheel - cant do more than a page at once if <100
user_pref("mousewheel.default.delta_multiplier_x", 100);
user_pref("mousewheel.default.delta_multiplier_y", 100);
user_pref("mousewheel.default.delta_multiplier_z", 100);
/// Preset to reset couple extra variables for consistency
user_pref("apz.allow_zooming", true);
user_pref("apz.force_disable_desktop_zooming_scrollbars", false);
user_pref("apz.paint_skipping.enabled", true);
user_pref("apz.windows.use_direct_manipulation", true);
user_pref("dom.event.wheel-deltaMode-lines.always-disabled", false);
user_pref("general.smoothScroll.durationToIntervalRatio", 200);
user_pref("general.smoothScroll.lines.durationMaxMS", 150);
user_pref("general.smoothScroll.lines.durationMinMS", 150);
user_pref("general.smoothScroll.other.durationMaxMS", 150);
user_pref("general.smoothScroll.other.durationMinMS", 150);
user_pref("general.smoothScroll.pages.durationMaxMS", 150);
user_pref("general.smoothScroll.pages.durationMinMS", 150);
user_pref("general.smoothScroll.pixels.durationMaxMS", 150);
user_pref("general.smoothScroll.pixels.durationMinMS", 150);
user_pref("general.smoothScroll.scrollbars.durationMaxMS", 150);
user_pref("general.smoothScroll.scrollbars.durationMinMS", 150);
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 200);
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 50);
user_pref("layers.async-pan-zoom.enabled", true);
user_pref("layout.css.scroll-behavior.spring-constant", "250");
user_pref("mousewheel.transaction.timeout", 1500);
user_pref("mousewheel.acceleration.factor", 10);
user_pref("mousewheel.acceleration.start", -1);
user_pref("mousewheel.min_line_scroll_amount", 5);
user_pref("toolkit.scrollbox.horizontalScrollDistance", 5);
user_pref("toolkit.scrollbox.verticalScrollDistance", 3);
/// Addons/Extensions
// Pocket
user_pref("extensions.pocket.enabled", true);
user_pref("extensions.pocket.refresh.emailButton.enabled", true);
user_pref("extensions.pocket.refresh.hideRecentSaves.enabled", true);
user_pref("extensions.pocket.showHome", true);
user_pref("extensions.pocket.bffRecentSaves", true);
user_pref("browser.urlbar.pocket.featureGate", true);
user_pref("browser.urlbar.suggest.pocket", true);
user_pref(
"browser.newtabpage.activity-stream.section.highlights.includePocket",
true
);
user_pref(
"browser.newtabpage.activity-stream.discoverystream.sendToPocket.enabled",
true
);
user_pref(
"browser.newtabpage.activity-stream.discoverystream.saveToPocketCard.enabled",
true
);