gocui - Minimalist Go package aimed at creating Console User Interfaces

2,214 views
Skip to first unread message

Roi Martin

unread,
Jan 28, 2014, 1:40:35 AM1/28/14
to golan...@googlegroups.com
Hi!

I've just released gocui, a minimalist Go package aimed at creating Console User Interfaces, based on termbox-go. You can find it at:

https://github.com/jroimartin/gocui

On-line doc: http://godoc.org/github.com/jroimartin/gocui

The main features of gocui are:
* Minimalist API.
* Views (the "windows" in the GUI) implement the interface io.Writer.
* Support for overlapping views.
* The GUI can be modified at runtime.
* Global and view-level keybindings.

A few examples can be found in the folder _demos (demo2.go is the more complete one).

Of course, comments are welcome. Thanks! :)

Best regards,
Roi Martin

Ben Hood

unread,
Jan 28, 2014, 10:07:35 AM1/28/14
to Roi Martin, golang-nuts
Very cool! I've done a couple of things on top of termbox-go, which is
a great library, but I was wondering to what extent a set widgets on
top of termbox would appear over time.

John Fries

unread,
Jan 28, 2014, 2:44:18 PM1/28/14
to Ben Hood, Roi Martin, golang-nuts
Thank you Roi for writing this, it looks really good. 

I've been experimenting with termbox-go myself lately, and I have a question for you and anyone else who is using termbox-go:

Is it feasible to use termbox-go to control multiple terminals from the same process? My hope is to have a single Go process that terminal users on a particular machine somehow attach to, so I can avoid having to do any kind of serialization over a socket layer and can just used shared memory to coordinate the terminals. This seems like an approach particularly well-suited for Go, but I don't have any experience with using libraries like ncurses, etc for detailed terminal control, and I haven't found a working example yet that seems adaptable to my needs. 

Any advice here would be greatly appreciated (even including someone telling me they think this is a bad idea and I should just use sockets).


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Roi Martin

unread,
Jan 29, 2014, 11:33:24 AM1/29/14
to golang-nuts
Hi John,

nsf please correct me if I am wrong, but the termbox-go's API only gives you control over the current terminal screen. On the other hand, regarding the design you are proposing, IMHO using sockets would be a better solution. Then, you can use termbox-go or gocui for the client which connects to the server component.

Kind regards,
Roi Martin
 
Reply all
Reply to author
Forward
0 new messages