-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack cells #7
Comments
Correct, that is a problem. I have not researched how to reliably and portably detect terminal width in go yet. If you have some hints/ideas, let me know. |
+1 |
@schachmat, here's a quick program showing how you can detect terminal width. You might have to run package main
import (
"fmt"
"golang.org/x/crypto/ssh/terminal"
)
func main() {
width, _, _ := terminal.GetSize(0)
fmt.Println("Width:", width)
} Outputs for me:
|
👍 |
@schachmat Take a look at this package - tablewriter |
tablewriter does not seem to support correct connections for the vertical and horizontal lines. Also embedding the date between the „Noon“ and „Evening“ columns can't be done. |
Apparently you can elegantly solve the problem using the core package Check here and here |
I don't know how compatible the renderings are, but you might be able to accomplish this with TermUI? |
I suppose cells should be stacked when terminal width is not sufficient for 4 cells of each day. Now in my terminal with 90 symbols width the output is a real mess.
The text was updated successfully, but these errors were encountered: