From 5b0bcdad2c03965026a6fbc9d9c8e251d2c330ff Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 18 Oct 2020 17:59:26 +0200 Subject: [PATCH] client.py: Extracted indicator in variable --- playbook/templates/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playbook/templates/client.py b/playbook/templates/client.py index 4b4ce65..8f3ce9f 100755 --- a/playbook/templates/client.py +++ b/playbook/templates/client.py @@ -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)