improved utf-8 usage, and color scheme
This commit is contained in:
parent
6d1d5ce1c6
commit
2e96e31a5b
@ -40,7 +40,7 @@ function allday(collection, desc, status, color) {
|
||||
# @return: Single-line string
|
||||
function endstoday(stop, collection, desc, status) {
|
||||
color = color_from_status(status)
|
||||
return collection " " LIGHT_CYAN " -- " stop OFF ": " color desc OFF
|
||||
return collection " " LIGHT_CYAN " → " stop ": " OFF color desc OFF
|
||||
}
|
||||
|
||||
# Return line for event that starts sometime today.
|
||||
@ -55,9 +55,9 @@ function endstoday(stop, collection, desc, status) {
|
||||
function slice(start, stop, collection, desc, status) {
|
||||
color = color_from_status(status)
|
||||
if (stop == "00:00")
|
||||
return collection " " LIGHT_CYAN start " -- " OFF ": " color desc OFF
|
||||
return collection " " LIGHT_CYAN start " → " ": " OFF color desc OFF
|
||||
else
|
||||
return collection " " LIGHT_CYAN start OFF " -- " LIGHT_CYAN stop OFF ": " color desc OFF
|
||||
return collection " " LIGHT_CYAN start " – " stop ": " OFF color desc OFF
|
||||
}
|
||||
|
||||
# Print line for a single hour entry.
|
||||
|
@ -22,9 +22,9 @@ BEGIN {
|
||||
OFS = "|"
|
||||
}
|
||||
/^[0-7] 00:00 -- 00:00/ { dayline = dayline " " c(); next }
|
||||
/^[0-7] 00:00 -- / { dayline = dayline " <--" $4 " " c(); next }
|
||||
/^[0-7] [0-9]{2}:[0-9]{2} -- 00:00/ { dayline = dayline " " $2 "→" c(); next }
|
||||
/^[0-7] [0-9]{2}:[0-9]{2} -- [0-9]{2}:[0-9]{2}/ { dayline = dayline " " $2 " - " $4 " " c(); next }
|
||||
/^[0-7] 00:00 -- / { dayline = dayline " → " $4 " " c(); next }
|
||||
/^[0-7] [0-9]{2}:[0-9]{2} -- 00:00/ { dayline = dayline " " $2 " → " c(); next }
|
||||
/^[0-7] [0-9]{2}:[0-9]{2} -- [0-9]{2}:[0-9]{2}/ { dayline = dayline " " $2 " – " $4 " " c(); next }
|
||||
/^[0-7]$/ && dayline { print "+", startofweek " +" $0-1 " days", "", dayline }
|
||||
/^[0-7]$/ {
|
||||
cmd = "date -d '" startofweek " +" $0 " days' +\"%a %e %b %Y\""
|
||||
|
Loading…
Reference in New Issue
Block a user