Added Basic Layout and Using tview package for TUI

Decided to Go with tview package for building TUIs and
just added the basic layout of the app.
The Idea is to have a side menu to navigate between the other options.
Just like spotify-tui ( Which has taken inspiration from the orignal
spotify Client) and Having a progress bar at bottom ( Still figuring out
how to implement this )
This commit is contained in:
aditya-K2
2021-10-13 00:00:16 +05:30
parent b722d53684
commit 5f9c5fde52
3 changed files with 52 additions and 1 deletions

18
main.go Normal file
View File

@@ -0,0 +1,18 @@
// Demo code for the TextView primitive.
package main
import (
"github.com/rivo/tview"
)
func main(){
flext := tview.NewFlex().SetDirection(tview.FlexRow).
AddItem(tview.NewFlex().
AddItem(tview.NewBox().SetBorder(true).SetTitle("Top"), 0, 1, false).
AddItem(tview.NewBox().SetBorder(true).SetTitle("Top"), 0, 2, false), 0, 7, false).
AddItem(tview.NewBox().SetBorder(true).SetTitle("Lmao"), 0, 1, false)
if err := tview.NewApplication().SetRoot(flext, true).Run(); err != nil {
panic(err)
}
}