-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstartgoofcord
35 lines (30 loc) · 1.4 KB
/
startgoofcord
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
#!/usr/bin/env bash
FEATURES="UseSkiaRenderer,VaapiVideoDecoder,VaapiVideoEncoder,PulseaudioLoopbackForScreenShare,VaapiVideoDecodeLinuxGL,WaylandWindowDecorations"
export TMPDIR="$XDG_RUNTIME_DIR/app/${FLATPAK_ID:-io.github.milkshiift.GoofCord}"
# https://wiki.archlinux.org/title/Chromium
declare -a FLAGS=(
--enable-gpu-rasterization # To support mixed refresh rates + hardware acceleration
--ignore-gpu-blocklist # Forcing hardware acceleration
--enable-zero-copy # Hardware acceleration
--enable-drdc # Hardware acceleration
)
if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
if [[ -c /dev/nvidia0 ]]; then
echo "Using NVIDIA on Wayland, disabling gpu sandbox"
FLAGS+=(--disable-gpu-sandbox)
fi
WAYLAND_SOCKET=${WAYLAND_DISPLAY:-"wayland-0"}
if [[ "${WAYLAND_SOCKET:0:1}" != "/" ]]; then
WAYLAND_SOCKET="$XDG_RUNTIME_DIR/$WAYLAND_SOCKET"
fi
if [[ -e "$WAYLAND_SOCKET" ]]; then
echo "Wayland socket is available, running natively on Wayland."
echo "To disable, remove the --socket=wayland permission."
FLAGS+=(--ozone-platform-hint=auto)
FLAGS+=(--enable-wayland-ime)
FLAGS+=(--wayland-text-input-version=3)
fi
fi
FLAGS+=(--enable-features="${FEATURES}")
echo "Passing the following arguments to Electron:" "${FLAGS[@]}"
exec zypak-wrapper /app/bin/goofcord/goofcord "${FLAGS[@]}" "$@"