From b7b6b6cc74a477a3745d06bce64e284e5b2dd880 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 21 May 2019 22:41:22 -0700 Subject: Added ctrl-z for suspend and added a sort of hybrid mode for running commands at the bottom of the screen instead of in a full terminal mode. --- config.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'config.h') diff --git a/config.h b/config.h index c9b3311..146696d 100644 --- a/config.h +++ b/config.h @@ -9,7 +9,7 @@ #define CD_TO_RESULT (1<<1) #define REFRESH (1<<2) #define CLEAR_SELECTION (1<<3) -#define SILENT (1<<4) +#define ONSCREEN (1<<4) #define DEVNULL " >/dev/null" @@ -17,18 +17,19 @@ struct { int key; const char *command; int flags; - const char *prompt; } bindings[] = { {'?', "less"}, - {'D', "xargs rm -rf" DEVNULL, CLEAR_SELECTION | REFRESH | SILENT}, - {'d', "xargs -I @ sh -c 'rm -rfi @ /dev/tty && head -n1 /dev/tty`\"", ONSCREEN | REFRESH | NO_FILES}, {'|', "sh -c \"`printf '> ' >/dev/tty && head -n1 /dev/tty`\"", REFRESH}, {'>', "sh -c \"`printf '> ' >/dev/tty && head -n1 /dev/tty`\"", NO_FILES | REFRESH}, + {'r', "xargs -I @ -n1 sh -c 'mv \"@\" \"`printf \"\e[1mRename \e[0;33m%%s\e[0m: \" \"@\" >&2 && head -n1 &2 && head -n1