~psic4t/qcal

4d73b79324e70304d03a98c4a3c3b3ed00e86415 — psic4t 7 months ago ff41060
highlight current day's appointments
2 files changed, 14 insertions(+), 4 deletions(-)

M defines.go
M helpers.go
M defines.go => defines.go +1 -1
@@ 24,7 24,7 @@ var endDateUTC string
var summary string
var toFile bool

//var colorBlock string = "█"
var colorBlock1 string = "█"
var colorBlock string = "|"
var elements []Event
var Colors = [10]string{"\033[0;31m", "\033[0;32m", "\033[1;33m", "\033[1;34m", "\033[1;35m", "\033[1;36m", "\033[1;37m", "\033[1;38m", "\033[1;39m", "\033[1;40m"}

M helpers.go => helpers.go +13 -3
@@ 118,7 118,11 @@ func (e Event) fancyOutput() {
	// whole day or greater
	if e.Start.Format(timeFormat) == e.End.Format(timeFormat) {
		if showColor {
			fmt.Print(e.Color + colorBlock + ColDefault + ` `)
			if e.Start.Format(IcsFormatWholeDay) == time.Now().Format(IcsFormatWholeDay) {
				fmt.Print(e.Color + colorBlock + ColWhite + ` `)
			} else {
				fmt.Print(e.Color + colorBlock + ColDefault + ` `)
			}
		}
		fmt.Print(e.Start.Format(dateFormat) + ` `)
		fmt.Printf(`%6s`, ` `)


@@ 131,10 135,16 @@ func (e Event) fancyOutput() {
		}
	} else {
		if showColor {
			fmt.Print(e.Color + colorBlock + ColDefault + ` `)
			if e.Start.Format(IcsFormatWholeDay) == time.Now().Format(IcsFormatWholeDay) {
				fmt.Print(e.Color + colorBlock + ColWhite + ` `)
			} else {
				fmt.Print(e.Color + colorBlock + ColDefault + ` `)
			}
		}

		fmt.Print(e.Start.Format(RFC822) + ` `)
		fmt.Println(e.Summary + ` (until ` + e.End.Format(timeFormat) + `)`)
		fmt.Println(e.Summary + ` (until ` + e.End.Format(timeFormat) + `)` + ColDefault)

	}

	if showInfo {