X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=lightcards%2Fdisplay.py;h=e91fed1a302db23d1626464d44c869df0c0194b9;hb=1dacbc89d337361486116644a0ea9b3e1a76bac6;hp=f93b0fa58921f1aa881e97a11d6d2db1d24cf737;hpb=ea55d7a18ee925988e2d71b92cfb4b2f3bfcfedc;p=lightcards.git diff --git a/lightcards/display.py b/lightcards/display.py index f93b0fa..e91fed1 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -132,6 +132,7 @@ class Menu: curses.color_pair(1) + curses.A_BOLD, ) self.win.hline(2, 1, curses.ACS_HLINE, mcols) + env = os.environ.get("EDITOR", "$EDITOR")[:15] text = [ "[y]: reset stack to original state", "[a]: alphabetize stack", @@ -140,8 +141,7 @@ class Menu: "[u]: unstar all", "[d]: star all", "[s]: update stack to include starred only", - "[e]: open the input file in $EDITOR", - "", + f"[e]: open the input file in {env}" "", "[r]: restart", "[m]: close menu", ] @@ -193,6 +193,7 @@ class Menu: shuffle(self.outer.stack) self.menu_print("Stack shuffled!") elif key == "e": + progress.dump(self.outer.stack, runner.get_orig()[1]) curses.endwin() os.system(f"$EDITOR {self.outer.input_file}"), (self.outer.headers, self.outer.stack) = parse.parse_html(