{"id":22180703,"url":"https://github.com/jftuga/termsize","last_synced_at":"2025-10-06T13:19:55.935Z","repository":{"id":57575365,"uuid":"325342067","full_name":"jftuga/termsize","owner":"jftuga","description":"Go module to return the terminal width and height","archived":false,"fork":false,"pushed_at":"2021-02-17T13:34:54.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T23:29:57.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jftuga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-29T17:01:56.000Z","updated_at":"2021-11-09T08:25:08.000Z","dependencies_parsed_at":"2022-09-26T19:02:07.862Z","dependency_job_id":null,"html_url":"https://github.com/jftuga/termsize","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ftermsize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ftermsize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ftermsize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Ftermsize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jftuga","download_url":"https://codeload.github.com/jftuga/termsize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245334899,"owners_count":20598386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T09:19:21.371Z","updated_at":"2025-10-06T13:19:50.883Z","avatar_url":"https://github.com/jftuga.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# termsize\nGo module to return the terminal width and height\n\nThe [Releases Page](https://github.com/jftuga/termsize/releases) contains command-line binaries for Windows, MacOS and Linux.\n\n## NOTES\nWhen a terminal is not available such as when using a pipe or redirecting to a file, then the `DefaultWidth` and \n`DefaultHeight` as defined in `defaults.go` will be used.  These defaults can be changed by setting \n`termsize.DefaultWidth` and `termsize.DefaultHeight`.\n\n## INSTALL\n\nGo version 1.16 or newer is required for compilation.\n\n```\ngo get github.com/jftuga/termsize\n```\n\n## ACKNOWLEDGEMENTS\nThis code is adapted from https://github.com/jessevdk/go-flags.\n* [BSD-3-Clause License](https://github.com/jftuga/termsize/blob/main/LICENSE)\n\n## Example\n\n```go\n// Tested on Windows 10, Raspberry Pi OS Linux, and MacOS Big Sur 11.1\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/jftuga/termsize\"\n)\n\nfunc main() {\n\ttermsize.DefaultHeight = 133\n\tw := termsize.Width()\n\th := termsize.Height()\n\tfmt.Printf(\"%dx%d\\n\", w, h)\n}\n```\n\n## Output\n\n```\nPS C:\\termsize\u003e .\\termsize.exe\n133x46\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Ftermsize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjftuga%2Ftermsize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Ftermsize/lists"}