Skip to content

Commit

Permalink
version
Browse files Browse the repository at this point in the history
  • Loading branch information
boz committed Apr 25, 2017
1 parent 686c980 commit 0e829d9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
30 changes: 17 additions & 13 deletions ui/tui.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package ui

import (
"fmt"

"github.com/boz/ephemerald/version"
"github.com/gdamore/tcell"
"github.com/gdamore/tcell/views"
)
Expand Down Expand Up @@ -114,23 +117,24 @@ func poolsWidget() *tablePanel {
}

func createTuiApp(shutdownch chan bool) (*views.Application, *tuiWindow) {
title := views.NewTextBar()
title.SetStyle(tcell.StyleDefault.
Background(tcell.ColorTeal).
Foreground(tcell.ColorWhite))
title.SetCenter("Ephemerald", tcell.StyleDefault)

keybar := views.NewSimpleStyledText()
kbbg := tcell.StyleDefault.
Background(tcell.ColorSilver)

kbstyle := kbbg.Foreground(tcell.ColorBlack)

keybar := views.NewSimpleStyledTextBar()

keybar.SetStyle(kbstyle)

keybar.RegisterLeftStyle('N', kbstyle)

keybar.RegisterStyle('N', tcell.StyleDefault.
Background(tcell.ColorSilver).
Foreground(tcell.ColorBlack))
keybar.RegisterLeftStyle('A', kbstyle.Foreground(tcell.ColorRed))

keybar.RegisterStyle('A', tcell.StyleDefault.
Background(tcell.ColorSilver).
Foreground(tcell.ColorRed))
keybar.SetLeft("%N[%AQ%N] Quit")

keybar.SetMarkup("[%AQ%N] Quit")
keybar.RegisterRightStyle('N', kbstyle)
keybar.SetRight(fmt.Sprintf("%%NEphemerald %v", version.Version))

app := &views.Application{}

Expand Down
3 changes: 3 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package version

const Version = "0.3.0"

0 comments on commit 0e829d9

Please sign in to comment.