]> git.rmz.io Git - dotfiles.git/blob - bin/curses-color
nvim: tidy lazy.lua
[dotfiles.git] / bin / curses-color
1 #!/usr/bin/env python
2
3 import curses
4
5 def main(stdscr):
6 curses.start_color()
7 curses.use_default_colors()
8 for i in range(0, curses.COLORS):
9 curses.init_pair(i + 1, i, -1)
10 try:
11 for i in range(0, 256):
12 x = 4*(i % 16)
13 y = int(i / 16)
14 stdscr.addstr(y, x,str(i), curses.color_pair(i))
15 except curses.ERR:
16 # End of screen reached
17 pass
18 stdscr.getch()
19
20 curses.wrapper(main)