-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
48 lines (41 loc) · 1.13 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
47
48
package main
import (
"os"
"github.com/stephane-martin/vssh/sys"
"github.com/awnumar/memguard"
"github.com/gdamore/tcell"
"github.com/rivo/tview"
"github.com/urfave/cli"
)
// version stores the current version number of vssh. It it set by the Makefile.
var version string
func main() {
app := App()
cli.OsExiter = func(code int) {
_ = os.Stdout.Sync()
_ = os.Stderr.Sync()
memguard.DestroyAll()
if code != 0 {
os.Exit(code)
}
}
sys.StartAgent()
_ = app.Run(os.Args)
sys.StopAgent()
cli.OsExiter(0)
}
func init() {
tview.Styles = tview.Theme{
PrimitiveBackgroundColor: tcell.ColorBlack,
ContrastBackgroundColor: tcell.ColorDarkSlateGray,
MoreContrastBackgroundColor: tcell.ColorDarkCyan,
BorderColor: tcell.ColorLightYellow,
TitleColor: tcell.ColorViolet,
GraphicsColor: tcell.ColorWhite,
PrimaryTextColor: tcell.ColorFloralWhite,
SecondaryTextColor: tcell.ColorLightBlue,
TertiaryTextColor: tcell.ColorLightGreen,
InverseTextColor: tcell.ColorBlue,
ContrastSecondaryTextColor: tcell.ColorLightCoral,
}
}