Merge pull request #4 from fazalmajid/solaris

Solaris/Illumos support
tree: 090e2845098040d6c822f7b503aaace61687b9ec
  1. .travis.yml
  2. doc.go
  3. LICENCE
  4. README.md
  5. ts.go
  6. ts_darwin.go
  7. ts_linux.go
  8. ts_other.go
  9. ts_solaris.go
  10. ts_test.go
  11. ts_unix.go
  12. ts_windows.go
  13. ts_x.go
README.md

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