[visual-studio-code-bin] Add wrapper for custom flags

This allows per-user configuration for native Wayland support.
This commit is contained in:
n0k0m3
2022-02-03 10:39:50 -05:00
committed by D. Can Celasun
parent 832576b3e8
commit a059583646
6 changed files with 51 additions and 12 deletions

11
visual-studio-code-bin.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}
# Allow users to override command-line options
if [[ -f $XDG_CONFIG_HOME/code-flags.conf ]]; then
CODE_USER_FLAGS="$(cat $XDG_CONFIG_HOME/code-flags.conf)"
fi
# Launch
exec /opt/visual-studio-code/bin/code $CODE_USER_FLAGS "$@"