You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
42 lines
1.3 KiB
#!/usr/bin/env bash
|
|
|
|
RENDER='/dev/dri/by-path/pci-0000:00:02.0-render'
|
|
|
|
set -e
|
|
|
|
# --enable-wayland-ime --wayland-text-input-version=3 \
|
|
# --gtk-version=4 \
|
|
# --ozone-platform-hint=auto \
|
|
# --disable-features=WaylandWpColorManagerV1 \
|
|
#,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE \
|
|
ARGS=(
|
|
--gtk-version=4
|
|
--password-store=basic
|
|
--new-canvas-2d-api --enable-accelerated-2d-canvas
|
|
--enable-parallel-downloading
|
|
--enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoEncoder
|
|
--ignore-gpu-blocklist --enable-zero-copy
|
|
)
|
|
|
|
if [[ -z "$CHRM_CMD" ]]; then
|
|
for CHRM_CMD in {chromium,brave,vivaldi,{google-,}chrome,{ms,}edge,helium-browser}{,-stable,-beta,-dev}; do
|
|
if which "$CHRM_CMD" >/dev/null 2>&1; then
|
|
ARGS+=("--render-node-override=$RENDER")
|
|
break
|
|
fi
|
|
echo 'No executable binary file' >&2
|
|
exit 1
|
|
done
|
|
fi
|
|
|
|
ARGS+=(--disk-cache-dir="${XDG_RUNTIME_DIR:-/tmp/chromany}/$(basename $CHRM_CMD)")
|
|
|
|
if [[ $XDG_SESSION_TYPE = 'wayland' ]]; then
|
|
ARGS+=(
|
|
--ozone-platform=wayland --disable-vulkan
|
|
--disable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan
|
|
--enable-features=AcceleratedVideoDecodeLinuxZeroCopyGL
|
|
)
|
|
fi
|
|
|
|
GTK_A11Y=none exec "$CHRM_CMD" "${ARGS[@]}" "$@"
|
|
|