mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 11:45:18 +03:00
do not add flags if ELECTRON_RUN_AS_NODE=1 - with this var electron behaves like node.js and doesn't like unknown flags. there's also a hack for code-oss to still pass the flags as usually. WaylandWindowDecorations makes the apps usable on gnome wayland. WebRTCPipeWireCapturer allows to screen-share in webrtc calls for more wayland users.
18 lines
642 B
Bash
18 lines
642 B
Bash
#!/bin/sh
|
|
|
|
# Allow the user to override command-line flags
|
|
# This is based on Debian's chromium-browser package, and is intended
|
|
# to be consistent with Debian.
|
|
for f in /etc/electron/*.conf; do
|
|
[ -f ${f} ] && . "${f}"
|
|
done
|
|
|
|
# Prefer user defined ELECTRON_USER_FLAGS (from env) over system
|
|
# default ELECTRON_FLAGS (from /etc/electron/default.conf).
|
|
export ELECTRON_FLAGS="$ELECTRON_FLAGS ${ELECTRON_USER_FLAGS:-"$ELECTRON_USER_FLAGS"}"
|
|
|
|
if [ "$ELECTRON_RUN_AS_NODE" == "1" ] && [ "$ELECTRON_STILL_PASS_THE_DEFAULT_FLAGS" != "1" ]; then
|
|
exec "/usr/lib/electron/electron" "$@"
|
|
fi
|
|
|
|
exec "/usr/lib/electron/electron" "$@" ${ELECTRON_FLAGS}
|