|
|
|
@ -6,14 +6,29 @@ import (
|
|
|
|
|
"io/ioutil"
|
|
|
|
|
"os"
|
|
|
|
|
"statusscreen"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
config := getConfig("status.toml")
|
|
|
|
|
|
|
|
|
|
sl := statusscreen.SL{Config: &config}
|
|
|
|
|
|
|
|
|
|
fmt.Println(sl.GetOutput())
|
|
|
|
|
clock := statusscreen.Clock{Config: &config}
|
|
|
|
|
weather := statusscreen.Weather{Config: &config}
|
|
|
|
|
|
|
|
|
|
for {
|
|
|
|
|
for _, row := range clock.GetOutput() {
|
|
|
|
|
fmt.Println(row)
|
|
|
|
|
}
|
|
|
|
|
for _, row := range weather.GetOutput() {
|
|
|
|
|
fmt.Println(row)
|
|
|
|
|
}
|
|
|
|
|
for _, row := range sl.GetOutput() {
|
|
|
|
|
fmt.Println(row)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
time.Sleep(1 * time.Second)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func getConfig(configFile string) statusscreen.Config {
|
|
|
|
|