summaryrefslogtreecommitdiff
path: root/khal-list
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-01-21 17:29:00 +0100
committerErich Eckner <git@eckner.net>2020-01-21 17:29:00 +0100
commit5d2ef23f9ed80033ad94ab4aff3c72463a217ad2 (patch)
tree72ef378e593842d261cd54603554172a70cf611d /khal-list
parent5eafa3744ad7c1ca633f1733ba68924d10c967a0 (diff)
downloadkhal-extras-5d2ef23f9ed80033ad94ab4aff3c72463a217ad2.tar.xz
khal-list: colors per host name
Diffstat (limited to 'khal-list')
-rwxr-xr-xkhal-list15
1 files changed, 12 insertions, 3 deletions
diff --git a/khal-list b/khal-list
index 9ad070d..cdf6f8a 100755
--- a/khal-list
+++ b/khal-list
@@ -1,9 +1,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@\x1b\[1m@${color}@g
- s@\(\x1b\[[0-9]\+m\)\+@ ${color grey}@g
- s@\xe2\x9f\xb3@...@g
+ s@\xe2\x9f\xb3@@g
s@\r$@@
'