From cd170de6777c517920abf7894c9dc2379fb12e5a Mon Sep 17 00:00:00 2001 From: Castor Gemini Date: Sun, 24 Aug 2025 08:39:59 -0500 Subject: feat(playback): Improve formatting of long playback --- terminal_width.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 terminal_width.go (limited to 'terminal_width.go') diff --git a/terminal_width.go b/terminal_width.go new file mode 100644 index 0000000..3421330 --- /dev/null +++ b/terminal_width.go @@ -0,0 +1,16 @@ +package main + +import ( + "os" + + "golang.org/x/term" +) + +func getTerminalWidth() int { + width, _, err := term.GetSize(int(os.Stdout.Fd())) + if err != nil { + // Return a default width if there's an error + return 80 + } + return width +} \ No newline at end of file -- cgit v1.2.3