102e417c8ced4479a89f62eb3152a86e7ed5437b
[bin.git] / daytime-term
1 #!/bin/sh
2 set -eu
3
4 if [ "${1:-}" = "night" ]; then
5     shift
6     night=1
7 elif [ "${1:-}" = "day" ]; then
8     night=
9 elif [ `date +%k` -ge 20 ] || [ `date +%k` -lt 5 ]; then
10     night=1
11 fi
12
13 if [ -n "${night:-}" ]; then
14     ARGS="-bg black -fg lightgray -palette #000000,#aa0000,#00aa00,#aaaa00,#6060f0,#aa00aa,#00aaaa,#aaaaaa,#545454,#ff5454,#54ff54,#ffff54,#5454ff,#ff54ff,#54ffff,#ffffff"
15 else
16     ARGS="-bg white -fg black -palette #000000,#aa0000,#00aa00,#aa5400,#3030cc,#aa00aa,#00aaaa,#aaaaaa,#545454,#ff5454,#54ff54,#ffff54,#5454ff,#ff54ff,#54ffff,#ffffff"
17 fi
18
19 simple-term -fn "monospace 9" $ARGS "$@"