blob: 69f54f52d35dd20a4f619a7e5d24098e6ed1a668 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
#
# Export an environment variable based on the terminal color scheme. Allows
# programs like VIM to dynamically adjust their colors to fit the controlling
# terminal.
#
# On Mac OS this requires setting the "Run Command" under the "Shell" tab of
# the terminal profile.
#
if [ "$1" = "-l" ]; then
export TERM_BG_SHADE="light"
elif [ "$1" = "-d" ]; then
export TERM_BG_SHADE="dark"
else
>&2 echo "WARNING: Terminal shade argument not passed!"
fi
exec $SHELL -l
|