-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgoogle-chrome
More file actions
executable file
·59 lines (46 loc) · 1.28 KB
/
Copy pathgoogle-chrome
File metadata and controls
executable file
·59 lines (46 loc) · 1.28 KB
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
#!/usr/bin/env bash
set -eu
export FONTCONFIG_FILE=~/.config/fontconfig/browser.conf
function join { local IFS="$1"; shift; echo "$*"; }
if [[ -x /usr/bin/google-chrome ]]; then
bin=/usr/bin/google-chrome
elif [[ -x /usr/bin/chromium ]]; then
bin=/usr/bin/chromium
else
echo no chrome >&2
exit 1
fi
flags=()
enable_features=()
disable_features=()
# scroll instantly on PageUp/Down
flags+=(--disable-smooth-scrolling)
# fixed large cache size
flags+=(--disk-cache-size=2147483647)
# enable subpixel positioning (yeah it says disable but it does the opposite)
flags+=(--disable-font-subpixel-positioning)
# enable MV2 and easy install
flags+=(--enable-easy-off-store-extension-install)
enable_features+=(AllowLegacyMV2Extensions)
disable_features+=(ExtensionManifestV2Unsupported ExtensionManifestV2Disabled)
# enable video acceleration
enable_features+=(
VaapiVideoEncoder
VaapiVideoDecodeLinuxGL
AcceleratedVideoEncoder
AcceleratedVideoDecodeLinuxGL
AcceleratedVideoDecodeLinuxZeroCopyGL
)
# enable Vulkan
enable_features+=(
Vulkan
DefaultANGLEVulkan
VulkanFromANGLE
)
# enable overlay scrollbars
enable_features+=(OverlayScrollbar)
exec \
"$bin" "${flags[@]}" \
--disable-features="$(join "," "${disable_features[@]}")" \
--enable-features="$(join "," "${enable_features[@]}")" \
"$@"