{"id":13819887,"url":"https://github.com/piotrmurach/tty-screen","last_synced_at":"2025-06-12T13:09:23.471Z","repository":{"id":23678268,"uuid":"27049702","full_name":"piotrmurach/tty-screen","owner":"piotrmurach","description":"Terminal screen detection - cross platform, major ruby interpreters","archived":false,"fork":false,"pushed_at":"2025-04-05T21:16:44.000Z","size":178,"stargazers_count":88,"open_issues_count":0,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-23T19:00:55.643Z","etag":null,"topics":["cli","columns","console","lines","rows","ruby","size","terminal","tty"],"latest_commit_sha":null,"homepage":"https://ttytoolkit.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piotrmurach.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"piotrmurach"}},"created_at":"2014-11-23T22:04:16.000Z","updated_at":"2025-04-05T21:16:47.000Z","dependencies_parsed_at":"2023-12-10T17:24:34.314Z","dependency_job_id":"e3013060-9e58-490b-91cd-547134f7c6e4","html_url":"https://github.com/piotrmurach/tty-screen","commit_stats":{"total_commits":220,"total_committers":6,"mean_commits":"36.666666666666664","dds":"0.022727272727272707","last_synced_commit":"e5a234c401e15f84c9583524896f6688809382f5"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrmurach%2Ftty-screen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrmurach%2Ftty-screen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrmurach%2Ftty-screen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrmurach%2Ftty-screen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piotrmurach","download_url":"https://codeload.github.com/piotrmurach/tty-screen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrmurach%2Ftty-screen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257074794,"owners_count":22486174,"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":["cli","columns","console","lines","rows","ruby","size","terminal","tty"],"created_at":"2024-08-04T08:00:54.491Z","updated_at":"2025-06-12T13:09:23.451Z","avatar_url":"https://github.com/piotrmurach.png","language":"Ruby","funding_links":["https://github.com/sponsors/piotrmurach"],"categories":["Happy Exploring 🤘"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://ttytoolkit.org\"\u003e\u003cimg width=\"130\" src=\"https://github.com/piotrmurach/tty/raw/master/images/tty.png\" alt=\"TTY Toolkit logo\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# TTY::Screen\n\n[![Gem Version](https://badge.fury.io/rb/tty-screen.svg)][gem]\n[![Actions CI](https://github.com/piotrmurach/tty-screen/actions/workflows/ci.yml/badge.svg)][gh_actions_ci]\n[![Build status](https://ci.appveyor.com/api/projects/status/myjv8kahk1iwrlha?svg=true)][appveyor]\n[![Code Climate](https://codeclimate.com/github/piotrmurach/tty-screen/badges/gpa.svg)][codeclimate]\n[![Coverage Status](https://coveralls.io/repos/piotrmurach/tty-screen/badge.svg)][coverage]\n\n[gitter]: https://gitter.im/piotrmurach/tty\n[gem]: http://badge.fury.io/rb/tty-screen\n[gh_actions_ci]: https://github.com/piotrmurach/tty-screen/actions/workflows/ci.yml\n[appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-screen\n[codeclimate]: https://codeclimate.com/github/piotrmurach/tty-screen\n[coverage]: https://coveralls.io/r/piotrmurach/tty-screen\n\n\u003e Terminal screen size detection that works on Linux, macOS and Windows systems\n  and supports Ruby MRI, JRuby, TruffleRuby and Rubinius interpreters.\n\n**TTY::Screen** provides a terminal screen size detection component for the\n[TTY](https://github.com/piotrmurach/tty) toolkit.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"tty-screen\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tty-screen\n\n## 1. Usage\n\nUse the `size` method to detect terminal screen size. It will result in\na `[height, width]` array:\n\n```ruby\nTTY::Screen.size  # =\u003e [51, 280]\n```\n\nUse the `width`, `columns` or `cols` method to detect terminal screen width:\n\n```ruby\nTTY::Screen.width    # =\u003e 280\nTTY::Screen.columns  # =\u003e 280\nTTY::Screen.cols     # =\u003e 280\n```\n\nUse the `height`, `lines` or `rows` method to detect terminal screen height:\n\n```ruby\nTTY::Screen.height  # =\u003e 51\nTTY::Screen.lines   # =\u003e 51\nTTY::Screen.rows    # =\u003e 51\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\nThen, run `rake spec` to run the tests. You can also run `bin/console`\nfor an interactive prompt that will allow you to experiment.\n\n## Contributing\n\n1. Fork it ( https://github.com/piotrmurach/tty-screen/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the TTY::Screen project's codebases, issue trackers,\nchat rooms and mailing lists is expected to follow the\n[code of conduct](https://github.com/piotrmurach/tty-screen/blob/master/CODE_OF_CONDUCT.md).\n\n## Copyright\n\nCopyright (c) 2014 Piotr Murach. See\n[LICENSE.txt](https://github.com/piotrmurach/tty-screen/blob/master/LICENSE.txt)\nfor further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrmurach%2Ftty-screen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiotrmurach%2Ftty-screen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrmurach%2Ftty-screen/lists"}