|
|
|
@ -6,6 +6,8 @@ import subprocess
|
|
|
|
|
import sys
|
|
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
|
|
indicator = "➤"
|
|
|
|
|
|
|
|
|
|
binding_up = [ord('k'), curses.KEY_UP]
|
|
|
|
|
binding_down = [ord('j'), curses.KEY_DOWN]
|
|
|
|
|
binding_accept = [ord('l'), ord(' '), ord('\n')]
|
|
|
|
@ -30,7 +32,7 @@ def show_select(win, path):
|
|
|
|
|
sel = 0
|
|
|
|
|
while True:
|
|
|
|
|
for y, d in enumerate(dirs):
|
|
|
|
|
win.addstr(y, 0, ("➤ " if y == sel else " ") + d.name + (" " * (curses.COLS - 2 - len(d.name))), curses.A_STANDOUT if y == sel else curses.A_NORMAL)
|
|
|
|
|
win.addstr(y, 0, (indicator + " " if y == sel else " ") + d.name + (" " * (curses.COLS - 2 - len(d.name))), curses.A_STANDOUT if y == sel else curses.A_NORMAL)
|
|
|
|
|
c = win.getch()
|
|
|
|
|
if c in binding_up:
|
|
|
|
|
sel = max(0, sel - 1)
|
|
|
|
|