Clone this repo:

Branches

  1. 78ecb04 Merge pull request #4 from fazalmajid/solaris by Oleku Konko · 7 weeks ago master
  2. f24b78e removed unused funciton on Solaris by Fazal Majid · 8 weeks ago
  3. b818fdc Solaris support by Fazal Majid · 8 weeks ago
  4. ecf753e Merge pull request #2 from prasannavl/patch-1 by Oleku Konko · 3 years, 7 months ago
  5. ec089c3 Fix the co-ords on Windows. by Prasanna V. Loganathar · 3 years, 7 months ago

ts (Terminal Size)

Build Status Total views

Simple go Application to get Terminal Size. So Many Implementations do not support windows but ts has full windows support. Run go get github.com/olekukonko/ts to download and install

Example

package main

import (
	"fmt"
	"github.com/olekukonko/ts"
)

func main() {
	size, _ := ts.GetSize()
	fmt.Println(size.Col())  // Get Width
	fmt.Println(size.Row())  // Get Height
	fmt.Println(size.PosX()) // Get X position
	fmt.Println(size.PosY()) // Get Y position
}

See Documentation