")]" +
" [" +
headers[obj.getSide()] +
- "]", curses.color_pair(1))
+ " (" +
+ str(obj.getSide() + 1) +
+ ")]", curses.color_pair(1))
def disp_menu(stdscr, stack, headers, idx):
disp_menu(stdscr, stack, headers, obj)
else:
if obj.getSide() == 0:
- top = headers[obj.getSide()] + "; " + str(obj.getIdx() + 1)
+ top = str(obj.getIdx() + 1) + " | " + headers[obj.getSide()]
else:
- top = headers[obj.getSide()] + "; " + str(obj.getIdx() + 1) + \
- "; " + str(stack[obj.getIdx()][0])
-
+ top = str(obj.getIdx() + 1) + " | " + headers[obj.getSide()] \
+ + " | \"" + str(stack[obj.getIdx()][0]) + "\""
header_width = mcols
if mcols > 80:
header_width = 80
placeholder="…"), curses.A_BOLD)
# Add horizontal line
- lin_width = mcols
- if len(top) < mcols:
+ lin_width = header_width
+ if len(top) < header_width:
lin_width = len(top)
stdscr.hline(1, 0, curses.ACS_HLINE, lin_width)
wrap_width = mcols
if mcols > 80:
wrap_width = 80
- stdscr.hline(curses.ACS_HLINE, lin_width)
stdscr.addstr(2, 0, textwrap.fill(stack[obj.getIdx()][obj.getSide()],
width=wrap_width))
disp_bar(stdscr, stack, headers, obj)
disp_card(stdscr, stack, headers, idx)
elif key in ["0", "^", "KEY_HOME"]:
idx.setIdx(0)
+ idx.setSide(0)
disp_card(stdscr, stack, headers, idx)
elif key in ["$", "KEY_END"]:
idx.setIdx(len(stack) - 1)
+ idx.setSide(0)
disp_card(stdscr, stack, headers, idx)