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