summaryrefslogtreecommitdiff
path: root/khal-list
blob: cdf6f8a375f7f13921364e70206afcf5bd7b29d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

script -qefc '/usr/bin/khal list today week' /dev/null </dev/null \
| if hostname | grep -qxF desk.home.eckner.net; then
  sed '
    s@\x1b\[1m@${color #303030}@g
    s@\(\x1b\[[0-9]\+m\)\+@ ${color}@g
  '
else
  sed '
    s@\x1b\[1m@${color}@g
    s@\(\x1b\[[0-9]\+m\)\+@ ${color grey}@g
  '
fi \
| sed '
  s@\xe2\x9f\xb3@@g
  s@\r$@@
'