Skip to content

Instantly share code, notes, and snippets.

@ta1kt0me
Created January 2, 2017 00:07
Show Gist options
  • Save ta1kt0me/d890ef0b25513be40e2e1e3b60d0d51a to your computer and use it in GitHub Desktop.
Save ta1kt0me/d890ef0b25513be40e2e1e3b60d0d51a to your computer and use it in GitHub Desktop.
require 'curses'
include Curses
init_screen
start_color
(Curses.constants.grep(/\AA_/) - [:A_ATTRIBUTES]).each.with_index do |e, i|
setpos(i, 0)
addstr(e.to_s)
setpos(i, 15)
attron(Curses.const_get(e))
addstr(e.to_s)
attroff(Curses.const_get(e))
end
refresh
getch
close_screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment