aboutsummaryrefslogtreecommitdiffstats
path: root/config.h
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-09-03 15:58:58 +0200
committerBert <ber.t@gmx.com>2011-09-03 15:58:58 +0200
commit9fa0bbca17f6346f10cffb618d2905dd3711c291 (patch)
treeab8958971a5b0b121b0ae3449b05d3d2de898a39 /config.h
parentde6b58a3156e64963f5bf48fa446bfbf3bb9da3f (diff)
downloadnsxiv-9fa0bbca17f6346f10cffb618d2905dd3711c291.tar.zst
Simplified it_shell_cmd() using SXIV_IMG env-variable
Diffstat (limited to 'config.h')
-rw-r--r--config.h14
1 files changed, 9 insertions, 5 deletions
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: */