Charles Corbett · @chas
31 followers · 287 posts · Server tty0.social

So one of the problems I have to solve writing my library was formatting text within a drawable area. I ended up writing which is another library specifically for manipulating []rune and dealing with whitespace, directional justification, and even producing a "full" justification style by normalizing whitespace across a []rune.

The library can be found here with MIT License:

github.com/asciifaceman/rslice

Docs:

pkg.go.dev/github.com/asciifac

#golang #tui #tooey #rslice #programming #foss #oss

Last updated 1 year ago

Charles Corbett · @chas
30 followers · 275 posts · Server tty0.social

Well I have the start of a text alignment engine implemented for Text elements.

I arrived at the conclusion naturally that the easiest path was to always start by doing a Left justification, then flip the whitespace for Right justification, or normalize whitespace across the rune array for full. I still have to do center which is going to be interesting.

#tooey #terminalui #tui #golang #tcell #termui #flex #cli #linux #alacritty #development #go

Last updated 1 year ago

Charles Corbett · @chas
30 followers · 270 posts · Server tty0.social

It's in a very early, very rough state but here is my rewrite

It only has a few core functionalities so far, notably flex-like containers and Text and they all need some more work before I consider anything stable.

For the love of TUIs

github.com/asciifaceman/tooey

#termui #tooey #terminalui #tui #golang #tcell #flex #cli

Last updated 1 year ago

Charles Corbett · @chas
30 followers · 269 posts · Server tty0.social

Flexing row and col directions now! I would have had it working an hour ago if I wasn't trying to be smart about it

#terminalui #tui #golang #tooey #tcell #termui #flex #cli

Last updated 1 year ago