All Projects → piotrmurach → tty-screen

piotrmurach / tty-screen

Licence: MIT license
Terminal screen detection - cross platform, major ruby interpreters

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to tty-screen

Upterm
A terminal emulator for the 21st century.
Stars: ✭ 19,441 (+24824.36%)
Mutual labels:  console, tty
Gritty
web terminal emulator
Stars: ✭ 63 (-19.23%)
Mutual labels:  console, tty
Ruby jard
Just Another Ruby Debugger. Provide a rich Terminal UI that visualizes everything your need, navigates your program with pleasure, stops at matter places only, reduces manual and mental efforts. You can now focus on real debugging.
Stars: ✭ 669 (+757.69%)
Mutual labels:  console, tty
enquirer
Stylish, intuitive and user-friendly prompts, for Node.js. Used by eslint, webpack, yarn, pm2, pnpm, RedwoodJS, FactorJS, salesforce, Cypress, Google Lighthouse, Generate, tencent cloudbase, lint-staged, gluegun, hygen, hardhat, AWS Amplify, GitHub Actions Toolkit, @airbnb/nimbus, and many others! Please follow Enquirer's author: https://github.…
Stars: ✭ 6,523 (+8262.82%)
Mutual labels:  console, tty
Xterm.js
A terminal for the web
Stars: ✭ 12,019 (+15308.97%)
Mutual labels:  console, tty
tty-reader
A set of methods for processing keyboard input in character, line and multiline modes.
Stars: ✭ 73 (-6.41%)
Mutual labels:  console, tty
Tty Font
Terminal fonts
Stars: ✭ 44 (-43.59%)
Mutual labels:  console, tty
ansicolor
A JavaScript ANSI color/style management. ANSI parsing. ANSI to CSS. Small, clean, no dependencies.
Stars: ✭ 91 (+16.67%)
Mutual labels:  console, tty
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (+25.64%)
Mutual labels:  console, tty
Zui
⬢ Zsh User Interface library – CGI+DHTML-like rapid application development with Zsh
Stars: ✭ 95 (+21.79%)
Mutual labels:  console, tty
gdb-dashboard
Modular visual interface for GDB in Python
Stars: ✭ 8,699 (+11052.56%)
Mutual labels:  console, tty
Finalcut
A text-based widget toolkit
Stars: ✭ 244 (+212.82%)
Mutual labels:  console, tty
std-env
Detect current Javascript environment
Stars: ✭ 85 (+8.97%)
Mutual labels:  console, tty
Tty Markdown
Convert a markdown document or text into a terminal friendly output.
Stars: ✭ 275 (+252.56%)
Mutual labels:  console, tty
fenrir
An TTY screenreader for Linux.
Stars: ✭ 33 (-57.69%)
Mutual labels:  console, tty
Tty Pager
Terminal output paging - cross-platform, major ruby interpreters
Stars: ✭ 37 (-52.56%)
Mutual labels:  console, tty
std
stdout, for humans.
Stars: ✭ 17 (-78.21%)
Mutual labels:  console, tty
x-terminal
An xterm based Atom plugin for providing terminals inside your Atom workspace.
Stars: ✭ 34 (-56.41%)
Mutual labels:  console, tty
Window Size
Reliable way to to get the height and width of the terminal/console in a node.js environment.
Stars: ✭ 79 (+1.28%)
Mutual labels:  console, size
Galacritty
WIP GTK terminal emulator based on Alacritty
Stars: ✭ 136 (+74.36%)
Mutual labels:  console, tty
TTY Toolkit logo

TTY::Screen Gitter

Gem Version Actions CI Build status Code Climate Coverage Status Inline docs

Terminal screen size detection which works on Linux, OS X and Windows/Cygwin platforms and supports MRI, JRuby, TruffleRuby and Rubinius interpreters.

TTY::Screen provides independent terminal screen size detection component for TTY toolkit.

Installation

Add this line to your application's Gemfile:

gem 'tty-screen'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tty-screen

1. Usage

TTY::Screen allows you to detect terminal screen size by calling size method which returns [height, width] tuple.

TTY::Screen.size     # => [51, 280]

To read terminal width do:

TTY::Screen.width    # => 280
TTY::Screen.columns  # => 280
TTY::Screen.cols     # => 280

Similarly, to read terminal height do:

TTY::Screen.height   # => 51
TTY::Screen.rows     # => 51
TTY::Screen.lines    # => 51

Contributing

  1. Fork it ( https://github.com/piotrmurach/tty-screen/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Copyright

Copyright (c) 2014 Piotr Murach. See LICENSE for further details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].