else:
percent = str(round(obj.getIdx() / (len(stack) - 1) * 100)).zfill(3)
+ # Print yellow if starred
+ stdscr.addstr(mlines - 1, 0, "[", curses.color_pair(1))
+ if stack[obj.getIdx()].getStar():
+ stdscr.addstr(stack[obj.getIdx()].printStar(), curses.color_pair(3))
+ else:
+ stdscr.addstr(stack[obj.getIdx()].printStar(), curses.color_pair(1))
+
# Put all the info together
- stdscr.insstr(mlines - 1, 0,
- "[" +
- stack[obj.getIdx()].printStar() +
- "] [" +
+ stdscr.addstr("] [" +
percent +
"% (" +
str(obj.getIdx() + 1).zfill(len(str(len(stack)))) +
curses.curs_set(0) # Hide cursor
curses.init_pair(1, curses.COLOR_CYAN, 0)
curses.init_pair(2, curses.COLOR_RED, 0)
+ curses.init_pair(3, curses.COLOR_YELLOW, 0)
get_key(stdscr, stack, headers, idx)