diff options
| author | Ben Winston | 2021-02-01 22:42:10 -0500 |
|---|---|---|
| committer | Ben Winston | 2021-02-01 22:42:10 -0500 |
| commit | e52231e8a148f325bc4e14d17db4ec43599e61a7 (patch) | |
| tree | fefa2d192712736b8d1fd55d13d87c6d8e8fca1b | |
| parent | bf9fb464924118e5dd73c9fe96ca2ba08485e5b6 (diff) | |
use default colors instead of white-on-black
| -rwxr-xr-x | roku-cli.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/roku-cli.py b/roku-cli.py index ea9ccdd..b448dcc 100755 --- a/roku-cli.py +++ b/roku-cli.py @@ -76,7 +76,11 @@ def draw_rect_key(stdscr, y, x, text, colors): stdscr.addstr(y + 2, x, owf.format('-' * iw)) # draw the inside - stdscr.addstr(y + 1, x + 1, iwf.format(text), curses.color_pair(colors)) + if colors == 1: + stdscr.addstr(y + 1, x + 1, iwf.format(text)) + elif colors == 2: + stdscr.addstr(y + 1, x + 1, iwf.format(text), curses.A_STANDOUT) + def status(stdscr): stdscr.addstr(20, 1, "~*~ roku-cli ~*~") @@ -139,8 +143,7 @@ def main(stdscr, ip): def init_curses(): # set up colors - curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK) - curses.init_pair(2, curses.COLOR_BLACK, curses.COLOR_WHITE) + curses.use_default_colors() # clear the screen and hide the cursor curses.curs_set(False) |
