From 9d11341a0c1611fd9c512caddd845d8ae8e5afc6 Mon Sep 17 00:00:00 2001 From: raul Date: Fri, 17 May 2024 09:43:27 +0200 Subject: [PATCH] Add tui.go --- cmd/tui.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/tui.go b/cmd/tui.go index ec76ebc..5269fdb 100644 --- a/cmd/tui.go +++ b/cmd/tui.go @@ -6,7 +6,7 @@ import ( "log" ) -func ui() { +func tui() { g, err := gocui.NewGui(gocui.Output256) if err != nil { log.Panicln(err) @@ -120,10 +120,9 @@ func layout(g *gocui.Gui) error { if _, err := g.SetCurrentView("songSelection"); err != nil { log.Panicln(err) } - for i := 0; i < 5; i++ { - songName := fmt.Sprintf("SongNumber%v", i) - fmt.Fprintln(songSelection, songName) - } + + s := fmt.Sprintf("%v (%v)", songToPlay.Title, songToPlay.Path) + fmt.Fprintln(songSelection, s) songSelection.Title = "Song selection:" songSelection.Wrap = true