From c0f8dd2bdb5a9f35f6d9b2bf458d20efceb2c80c Mon Sep 17 00:00:00 2001 From: Thomas Sindt Date: Mon, 6 Apr 2026 22:58:41 +0200 Subject: [PATCH] Startscreen --- pws/pws.go | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/pws/pws.go b/pws/pws.go index f5cf5a5..1b408bf 100644 --- a/pws/pws.go +++ b/pws/pws.go @@ -6,6 +6,7 @@ package main import ( "log" + gc "github.com/rthornton128/goncurses" ) @@ -17,37 +18,30 @@ func main() { log.Fatal(err) } defer gc.End() + gc.Echo(false) - // HasColors can be used to determine whether the current terminal - // has the capability of using colours. You could then chose whether or - // not to use some other mechanism, like using A_REVERSE, instead if !gc.HasColors() { log.Fatal("Example requires a colour capable terminal") } - - // Must be called after Init but before using any colour related functions if err := gc.StartColor(); err != nil { log.Fatal(err) } - - gc.Echo(false) - - // Initialize a colour pair. Should only fail if an improper pair value - // is given if err := gc.InitPair(1, gc.C_BLACK, gc.C_CYAN); err != nil { log.Fatal("InitPair failed: ", err) } stdscr.Keypad(true) - // ColorOn/Off is a shortcut to calling AttrOn/Off(gc.ColorPair(pair)) stdscr.ColorOn(1) stdscr.SetBackground(gc.Char(' ') | gc.ColorPair(1)) - stdscr.MovePrint(12, 30, "Hello, World!!!") - stdscr.MovePrint(13, 30, "Hello, World in Color!!!") + stdscr.Box(gc.ACS_VLINE, gc.ACS_HLINE) + // Window title + stdscr.MovePrint(0, 2, " Pipewire setup utility ") stdscr.Refresh() + + // Main loop stdscr.GetChar() - + + // end stdscr.ColorOff(1) - }