diff options
Diffstat (limited to 'khal-list')
-rwxr-xr-x | khal-list | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -2,14 +2,19 @@ date_format='%F %H:%M' +tmp_dir=$(mktemp -d) +trap 'rm -rf --one-file-system "${tmp_dir:?}"' EXIT + script -qefc '/usr/bin/khal list '"$( date +"${date_format}" )"' '"$( date +"${date_format}" -d@$(( $(date +%s)+6*24*60*60 )) -)" /dev/null </dev/null \ -| /usr/src/skripte/ansi-color-to-conky-color/ansi-color-to-conky-color "$@" \ +)"' 2>'"${tmp_dir}"'/stderr >'"${tmp_dir}"'/stdout' /dev/null </dev/null + +/usr/src/skripte/ansi-color-to-conky-color/ansi-color-to-conky-color "$@" \ +< "${tmp_dir}/stdout" \ | sed ' s@\xe2\x9f\xb3@@g s@\r$@@ @@ -26,3 +31,21 @@ script -qefc '/usr/bin/khal list '"$( | sed ' s/\(\(^\|}\)[^{}]\{47\}\)[^{}]\+\${/\1...${/ ' + +sed ' + s@^\(.\{47\}\)....*$@\1...@ + s@#@\\#@g +' "${tmp_dir}/stderr" \ +| tac \ +| sed -n ' + $ { + p + d + } + 1,3 p +' \ +| tac \ +| sed ' + 1 s@^@${color red}@ + $ s@$@${color}@ +' |