WhspBrd/_examples/getTerminalSize.go
2025-08-22 07:53:17 +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)
}