summarylogtreecommitdiffstats
path: root/vscodium-bin.sh
blob: f85fea8ffb6c1fe635c7c0bb36470401d945e821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-~/.config}

# Allow users to override command-line options
if [[ -f $XDG_CONFIG_HOME/codium-flags.conf ]]; then
    readarray lines <"$XDG_CONFIG_HOME/codium-flags.conf"
    for line in "${lines[@]}"; do
        if ! [[ "$line" =~ ^[[:space:]]*# ]]; then
           CODE_USER_FLAGS+=($line)
        fi
    done
fi

# Launch
exec /opt/vscodium-bin/bin/codium "$@" "${CODE_USER_FLAGS[@]}"