-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
47 lines (41 loc) · 1.15 KB
/
main.go
File metadata and controls
47 lines (41 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package main
import (
"fmt"
"os"
"github.com/fezcode/atlas.clock/pkg/ui"
)
var Version = "dev"
func printHelp() {
fmt.Println("Atlas Clock — phosphor-CRT TUI for multi-timezone dashboards.")
fmt.Println()
fmt.Println("Usage:")
fmt.Println(" atlas.clock Start the clock dashboard")
fmt.Println(" atlas.clock -v Show version")
fmt.Println(" atlas.clock -h Show this help")
fmt.Println()
fmt.Println("Inside the UI:")
fmt.Println(" ↑↓←→/hjkl navigate the grid")
fmt.Println(" SHIFT+arrow reorder the selected clock")
fmt.Println(" ↵ open the detail view")
fmt.Println(" a add a clock (label → zone → confirm)")
fmt.Println(" d delete the selected clock")
fmt.Println(" q quit")
fmt.Println()
fmt.Println("Config: ~/.atlas/clock.json")
}
func main() {
if len(os.Args) > 1 {
switch os.Args[1] {
case "-v", "--version":
fmt.Printf("atlas.clock v%s\n", Version)
return
case "-h", "--help", "help":
printHelp()
return
}
}
if err := ui.Start(ui.Config{Version: Version}); err != nil {
fmt.Printf("Error starting UI: %v\n", err)
os.Exit(1)
}
}