From 9fa0bbca17f6346f10cffb618d2905dd3711c291 Mon Sep 17 00:00:00 2001 From: Bert Date: Sat, 3 Sep 2011 15:58:58 +0200 Subject: Simplified it_shell_cmd() using SXIV_IMG env-variable --- config.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'config.h') diff --git a/config.h b/config.h index 46e30c6..aa8bc8a 100644 --- a/config.h +++ b/config.h @@ -110,11 +110,15 @@ static const keymap_t keys[] = { /* open current image with given program: */ { True, XK_g, it_open_with, (arg_t) "gimp" }, - /* run shell command line on current file ('#' is replaced by file path: */ - { True, XK_less, it_shell_cmd, (arg_t) "mogrify -rotate -90 #" }, - { True, XK_greater, it_shell_cmd, (arg_t) "mogrify -rotate +90 #" }, - { True, XK_comma, it_shell_cmd, (arg_t) "jpegtran -rotate 270 -copy all -outfile # #" }, - { True, XK_period, it_shell_cmd, (arg_t) "jpegtran -rotate 90 -copy all -outfile # #" }, + /* run shell command line on current file ("$SXIV_IMG"): */ + { True, XK_less, it_shell_cmd, (arg_t) \ + "mogrify -rotate -90 \"$SXIV_IMG\"" }, + { True, XK_greater, it_shell_cmd, (arg_t) \ + "mogrify -rotate +90 \"$SXIV_IMG\"" }, + { True, XK_comma, it_shell_cmd, (arg_t) \ + "jpegtran -rotate 270 -copy all -outfile \"$SXIV_IMG\" \"$SXIV_IMG\"" }, + { True, XK_period, it_shell_cmd, (arg_t) \ + "jpegtran -rotate 90 -copy all -outfile \"$SXIV_IMG\" \"$SXIV_IMG\"" }, }; /* mouse button mappings for image mode: */ -- cgit v1.2.3-54-g00ecf