-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.go
46 lines (38 loc) · 1.12 KB
/
main.go
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
package main
import (
"github.com/awnumar/memguard"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
var VERSION = "undefined"
// The application.
var app *tview.Application
// The master key
var masterKey *MasterKey
var theme = tview.Theme{
PrimitiveBackgroundColor: tcell.ColorWhite,
ContrastBackgroundColor: tcell.ColorBlue,
MoreContrastBackgroundColor: tcell.ColorGreen,
BorderColor: tcell.ColorBlack,
TitleColor: tcell.ColorRed,
GraphicsColor: tcell.ColorBlack,
PrimaryTextColor: tcell.ColorBlack,
SecondaryTextColor: tcell.ColorBlack,
TertiaryTextColor: tcell.ColorGreen,
InverseTextColor: tcell.ColorBlue,
ContrastSecondaryTextColor: tcell.ColorDarkCyan,
}
func main() {
fixCharset()
// Safely terminate in case of an interrupt signal
memguard.CatchInterrupt()
// Purge the session when we return
defer memguard.Purge()
app = tview.NewApplication()
tview.Styles = theme
initLayouts()
// Start the application and set root to Cover
if err := app.SetRoot(layoutRoot, true).Run(); err != nil {
panic(err)
}
}