You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
804 B
Go

package main
import (
"./src/clock"
"./src/config"
tm "github.com/buger/goterm"
"time"
)
func main() {
config := config.New("status.toml")
clock := clock.Clock{Config: &config}
sl := SL{Config: &config}
weather := Weather{Config: &config}
pollen := Pollen{Config: &config}
tm.Clear()
tm.Print("\033[?25l")
for {
tm.MoveCursor(1, 1)
for _, row := range clock.GetOutput() {
tm.Print(row + "\033[K\n")
}
tm.Print("\033[K\n")
for _, row := range weather.GetOutput() {
tm.Print(row + "\033[K\n")
}
tm.Print("\033[K\n")
for _, row := range pollen.GetOutput() {
tm.Print(row + "\033[K\n")
}
tm.Print("\033[K\n")
for _, row := range sl.GetOutput() {
tm.Print(row + "\033[K\n")
}
tm.Print("\033[J")
tm.Flush()
time.Sleep(time.Second / 10)
}
}