summarylogtreecommitdiffstats
path: root/electron-launcher.sh
diff options
context:
space:
mode:
Diffstat (limited to 'electron-launcher.sh')
-rw-r--r--electron-launcher.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/electron-launcher.sh b/electron-launcher.sh
new file mode 100644
index 000000000000..c947a7b8b181
--- /dev/null
+++ b/electron-launcher.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/bash
+
+set -euo pipefail
+
+name=electron13
+flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"
+
+declare -a flags
+
+if [[ -f "${flags_file}" ]]; then
+ mapfile -t < "${flags_file}"
+fi
+
+for line in "${MAPFILE[@]}"; do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
+ flags+=("${line}")
+ fi
+done
+
+exec /usr/lib/${name}/electron "$@" "${flags[@]}"