Clone this repo:

Branches

  1. ecf753e Merge pull request #2 from prasannavl/patch-1 by Oleku Konko · 3 years, 1 month ago master
  2. ec089c3 Fix the co-ords on Windows. by Prasanna V. Loganathar · 3 years, 1 month ago
  3. 225e4c2 Improve doc by olekukonko · 3 years, 3 months ago
  4. 0caa235 Import Fix by olekukonko · 3 years, 3 months ago
  5. 6e51ee7 Fixed Typo by olekukonko · 3 years, 4 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