{"id":16475958,"url":"https://github.com/softprops/termsize","last_synced_at":"2025-04-11T15:52:32.241Z","repository":{"id":34226256,"uuid":"38091960","full_name":"softprops/termsize","owner":"softprops","description":"terminal size matters","archived":false,"fork":false,"pushed_at":"2024-07-22T14:16:12.000Z","size":599,"stargazers_count":18,"open_issues_count":6,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T10:49:17.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/softprops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2015-06-26T05:12:25.000Z","updated_at":"2025-03-24T13:25:25.000Z","dependencies_parsed_at":"2024-06-07T17:43:25.723Z","dependency_job_id":"8a961553-120a-4956-a6be-4ebc9600c8a1","html_url":"https://github.com/softprops/termsize","commit_stats":{"total_commits":85,"total_committers":8,"mean_commits":10.625,"dds":"0.10588235294117643","last_synced_commit":"5e2ad23a34bc4eb0420191130b1ce80038bda44d"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftermsize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftermsize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftermsize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftermsize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/termsize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248435438,"owners_count":21103029,"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-10-11T12:41:01.675Z","updated_at":"2025-04-11T15:52:32.215Z","avatar_url":"https://github.com/softprops.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# termsize\n\n[![CI](https://github.com/softprops/termsize/actions/workflows/ci.yml/badge.svg)](https://github.com/softprops/termsize/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/termsize.svg)](https://crates.io/crates/termsize)\n\n\u003e because terminal size matters\n\nTermsize is a rust crate providing a multi-platform interface for resolving\nyour terminal's current size in rows and columns. On most unix systems, this is similar invoking the [stty(1)](http://man7.org/linux/man-pages/man1/stty.1.html) program, requesting the terminal size.\n\n\n## [Documentation](https://softprops.github.com/termsize)\n\n## install\n\nrun `cargo add termsize` in your terminal or add the following to your `Cargo.toml` file\n\n```toml\n[dependencies]\ntermsize = \"0.1\"\n```\n\n## usage\n\nTermize provides one function, `get`, which returns a `termsize::Size` struct\nexposing two fields: `rows` and `cols` representing the number of rows and columns\na a terminal's stdout supports.\n\n```rust\npub fn main() {\n  termsize::get().map(|{ rows, cols }| {\n    println!(\"rows {} cols {}\", size.rows, size.cols)\n  });\n}\n```\n\nDoug Tangren (softprops) 2015-2024","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Ftermsize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Ftermsize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Ftermsize/lists"}