• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Feb-2017-

.travis.ymlH A D16-Feb-201741 65

LICENCEH A D16-Feb-20171 KiB1916

README.mdH A D16-Feb-2017826 2921

doc.goH A D16-Feb-2017872 371

ts.goH A D16-Feb-2017681 3719

ts_darwin.goH A D16-Feb-2017362 154

ts_linux.goH A D16-Feb-2017356 144

ts_other.goH A D16-Feb-2017396 154

ts_test.goH A D16-Feb-2017724 3321

ts_unix.goH A D16-Feb-2017379 154

ts_windows.goH A D16-Feb-20171.8 KiB6536

ts_x.goH A D16-Feb-2017945 4729

README.md

1ts (Terminal Size)
2==
3
4[![Build Status](https://travis-ci.org/olekukonko/ts.png?branch=master)](https://travis-ci.org/olekukonko/ts) [![Total views](https://sourcegraph.com/api/repos/github.com/olekukonko/ts/counters/views.png)](https://sourcegraph.com/github.com/olekukonko/ts)
5
6Simple go Application to get Terminal Size. So Many Implementations do not support windows but `ts` has full windows support.
7Run `go get github.com/olekukonko/ts` to download and install
8
9#### Example
10
11```go
12package main
13
14import (
15	"fmt"
16	"github.com/olekukonko/ts"
17)
18
19func main() {
20	size, _ := ts.GetSize()
21	fmt.Println(size.Col())  // Get Width
22	fmt.Println(size.Row())  // Get Height
23	fmt.Println(size.PosX()) // Get X position
24	fmt.Println(size.PosY()) // Get Y position
25}
26```
27
28[See Documentation](http://godoc.org/github.com/olekukonko/ts)
29