WhspBrd/examples/getTerminalSize.go
foglar e3f9693cf6 Adds terminal unit resizing
Improves image rendering by allowing resizing based on terminal cell size, providing more control over image dimensions.
This is enabled by a new `units` parameter where 0 defaults to the previous pixel sizing and 1 enables terminal unit sizing.

Removes unused dependency.
2025-06-14 08:28:55 +02:00

19 lines
378 B
Go

package main
import (
"fmt"
"whspbrd/pkg/cell_size"
)
func main() {
w, h, err := cell_size.GetTerminalCellSizePixels()
if err != nil {
fmt.Println("Error getting terminal cell size:", err)
return
}
width, height := cell_size.GetConsoleSize()
fmt.Println("Terminal cell size in pixels:", w, "x", h)
fmt.Println("Console size in characters:", width, "x", height)
}