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

55 lines
842 B

package main
import (
"./src/clock"
"./src/config"
"./src/pollen"
"./src/sl"
tm "github.com/buger/goterm"
"time"
)
func main() {
config := config.New("status.toml")
clock := clock.Clock{Config: &config}
pollen := pollen.Pollen{Config: &config}
sl := sl.SL{Config: &config}
weather := Weather{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)
}
}