diff options
author | Bert <ber.t@gmx.com> | 2011-03-03 10:52:16 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-03-03 10:52:16 +0100 |
commit | 00d4b0f7cf6742a66f2bac262d5a3b3a9d0cc275 (patch) | |
tree | 9afbe75728e2077c50b3252548216e5ab44b5836 /commands.h | |
parent | 50e8fbf7b3261668f213e0b46523084bc7966c69 (diff) |
Use "/bin/sh -c" for external commands
Diffstat (limited to 'commands.h')
-rw-r--r-- | commands.h | 28 |
1 files changed, 6 insertions, 22 deletions
@@ -1,29 +1,13 @@ -#define FILENAME (const char*) 0x1 - typedef struct { KeySym ksym; - const char **cmdline; Bool reload; + const char *cmdline; } command_t; -static const char *cmdline_1[] = { - "jpegtran", "-rotate", "270", "-copy", "all", "-outfile", FILENAME, - FILENAME, NULL }; - -static const char *cmdline_2[] = { - "jpegtran", "-rotate", "90", "-copy", "all", "-outfile", FILENAME, - FILENAME, NULL }; - -static const char *cmdline_3[] = { - "mogrify", "-rotate", "-90", FILENAME, NULL }; - -static const char *cmdline_4[] = { - "mogrify", "-rotate", "+90", FILENAME, NULL }; - static command_t commands[] = { - /* key command-line reload? */ - { XK_a, cmdline_1, True }, - { XK_s, cmdline_2, True }, - { XK_A, cmdline_3, True }, - { XK_S, cmdline_4, True }, + /* key reload? command, '#' is replaced by filename */ + { XK_a, True, "jpegtran -rotate 270 -copy all -outfile # #" }, + { XK_s, True, "jpegtran -rotate 90 -copy all -outfile # #" }, + { XK_A, True, "mogrify -rotate -90 #" }, + { XK_S, True, "mogrify -rotate +90 #" } }; |