{"id":18552958,"url":"https://github.com/cryptosense/terminal_size","last_synced_at":"2025-04-09T22:32:05.923Z","repository":{"id":11248691,"uuid":"67512121","full_name":"cryptosense/terminal_size","owner":"cryptosense","description":"Get the size of the attached terminal in OCaml","archived":false,"fork":false,"pushed_at":"2022-04-26T15:04:36.000Z","size":60,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T13:21:19.048Z","etag":null,"topics":["ioctl","ocaml"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptosense.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-06T13:47:06.000Z","updated_at":"2025-01-26T20:53:27.000Z","dependencies_parsed_at":"2022-08-07T06:01:16.584Z","dependency_job_id":null,"html_url":"https://github.com/cryptosense/terminal_size","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptosense%2Fterminal_size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptosense%2Fterminal_size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptosense%2Fterminal_size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptosense%2Fterminal_size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptosense","download_url":"https://codeload.github.com/cryptosense/terminal_size/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123805,"owners_count":21051537,"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":["ioctl","ocaml"],"created_at":"2024-11-06T21:15:38.612Z","updated_at":"2025-04-09T22:32:05.490Z","avatar_url":"https://github.com/cryptosense.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Terminal_size`\n\n[![Build Status][build_status_badge]][build_status_link]\n[![Documentation][doc_badge]][doc_link]\n\n## What is it?\n\nYou can use this small ocaml library to detect the dimensions of the terminal\nwindow attached to a process. It contains the two following functions:\n\n```ocaml\nval get_rows : unit -\u003e int option\nval get_columns : unit -\u003e int option\n```\n\n## How does it work?\n\nUsually, to get this information, one would open a pipe from `tput cols` or\n`stty size` and parsing the output. Instead, this uses the `ioctl` that these\ncommands use, `TIOCGWINSZ`.\n\n[build_status_badge]: https://github.com/cryptosense/terminal_size/actions/workflows/main.yml/badge.svg\n[build_status_link]: https://github.com/cryptosense/terminal_size/actions/workflows/main.yml\n[doc_badge]: https://img.shields.io/badge/doc-online-blue.svg\n[doc_link]: https://cryptosense.github.io/terminal_size/doc/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptosense%2Fterminal_size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptosense%2Fterminal_size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptosense%2Fterminal_size/lists"}