[WIP] table formatting
This commit is contained in:
@ -2,8 +2,12 @@ package common
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"os"
|
||||
|
||||
"tasksquire/taskwarrior"
|
||||
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
type Common struct {
|
||||
@ -31,6 +35,8 @@ func NewCommon(ctx context.Context, tw taskwarrior.TaskWarrior) *Common {
|
||||
func (c *Common) SetSize(width, height int) {
|
||||
c.width = width
|
||||
c.height = height
|
||||
physicalWidth, physicalHeight, _ := term.GetSize(int(os.Stdout.Fd()))
|
||||
slog.Info("SetSize", "width", width, "height", height, "physicalWidth", physicalWidth, "physicalHeight", physicalHeight)
|
||||
}
|
||||
|
||||
func (c *Common) Width() int {
|
||||
|
||||
Reference in New Issue
Block a user