All Projects → agatan → ncurses.cr

agatan / ncurses.cr

Licence: MIT license
NCurses bindings for Crystal

Programming Languages

crystal
512 projects

Labels

Projects that are alternatives of or similar to ncurses.cr

2048 Cli
The game 2048 for your Linux terminal (https://github.com/gabrielecirulli/2048)
Stars: ✭ 176 (+450%)
Mutual labels:  ncurses
Viw
VI Worsened, a lightweight and fun VI clone.
Stars: ✭ 212 (+562.5%)
Mutual labels:  ncurses
Sc Im
sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Stars: ✭ 3,081 (+9528.13%)
Mutual labels:  ncurses
Pdcursesmod
Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model, modified and extended from the 'official' version
Stars: ✭ 182 (+468.75%)
Mutual labels:  ncurses
Cursive
A Text User Interface library for the Rust programming language
Stars: ✭ 2,613 (+8065.63%)
Mutual labels:  ncurses
Tmatrix
Terminal based replica of the digital rain from The Matrix.
Stars: ✭ 227 (+609.38%)
Mutual labels:  ncurses
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (+440.63%)
Mutual labels:  ncurses
readline-and-ncurses
Example demonstrating combining of readline and ncurses
Stars: ✭ 50 (+56.25%)
Mutual labels:  ncurses
Cuishark
A protocol analyzer like a wireshark on CUI. cuishark is using libwireshark to analyze packets. https://cuishark.slankdev.net
Stars: ✭ 208 (+550%)
Mutual labels:  ncurses
Fui
Add CLI & form interface to your program. Docs: https://docs.rs/fui
Stars: ✭ 244 (+662.5%)
Mutual labels:  ncurses
Neomutt
✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat
Stars: ✭ 2,343 (+7221.88%)
Mutual labels:  ncurses
Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+43950%)
Mutual labels:  ncurses
Joshuto
ranger-like terminal file manager written in Rust
Stars: ✭ 224 (+600%)
Mutual labels:  ncurses
Tty Solitaire
Play solitaire in your terminal!
Stars: ✭ 178 (+456.25%)
Mutual labels:  ncurses
NCURSES-Programming-HOWTO-examples
CMake examples for code in http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html
Stars: ✭ 114 (+256.25%)
Mutual labels:  ncurses
Tremc
Curses interface for transmission
Stars: ✭ 174 (+443.75%)
Mutual labels:  ncurses
Chkservice
Systemd units manager with ncurses, terminal interface
Stars: ✭ 219 (+584.38%)
Mutual labels:  ncurses
ncursesPac
ncurses pacman written in C++
Stars: ✭ 23 (-28.12%)
Mutual labels:  ncurses
todo list rust
Simple Ncurses Todo List ☑
Stars: ✭ 19 (-40.62%)
Mutual labels:  ncurses
Ncpamixer
ncurses PulseAudio Mixer
Stars: ✭ 234 (+631.25%)
Mutual labels:  ncurses

ncurses

ncurses.cr is a Crystal binding to the C ncurses library.

Installation

Add this to your application's shard.yml:

dependencies:
  ncurses:
    github: agatan/ncurses.cr

You also need to install the ncurses library. e.g. in ubuntu, sudo apt install libncursesw5-dev

Usage

require "ncurses"

NCurses.open do
  # initialize
  NCurses.cbreak
  NCurses.noecho
  NCurses.start_color

  # define background color
  pair = NCurses::ColorPair.new(1).init(NCurses::Color::RED, NCurses::Color::BLACK)
  NCurses.bkgd(pair)

  NCurses.erase
  # move the cursor
  NCurses.move(x: 0, y: 1)
  # longname returns the verbose description of the current terminal
  NCurses.addstr(NCurses.longname)

  NCurses.move(x: 0, y: 2)
  NCurses.addstr(NCurses.curses_version)

  NCurses.move(y: 10, x: 20)
  NCurses.addstr("Hello, world!")
  NCurses.refresh

  NCurses.notimeout(true)
  NCurses.getch
end

Examples

See example/ for more examples.

Contributing

  1. Fork it ( https://github.com/[your-github-name]/ncurses/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

Contributors

  • agatan Naomichi Agata - creator, maintainer
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].