diff options
author | Bert <ber.t@gmx.com> | 2011-03-01 18:49:02 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-03-01 18:49:02 +0100 |
commit | c05fd44bdda2934fa6f2f83b776038659f9d7d71 (patch) | |
tree | 9580d1edc2168c185a88943b430bef1d814077f7 /commands.h | |
parent | 955c39a5c5e3193e18c21abe87110651cc2472d2 (diff) | |
download | nsxiv-c05fd44bdda2934fa6f2f83b776038659f9d7d71.tar.zst |
Support for external commands like mogrify & jpegtran
Diffstat (limited to 'commands.h')
-rw-r--r-- | commands.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/commands.h b/commands.h new file mode 100644 index 0000000..6fcd602 --- /dev/null +++ b/commands.h @@ -0,0 +1,24 @@ +#define FILENAME (const char*) 0x1 + +typedef struct { + KeySym ksym; + const char **cmdline; + Bool reload; +} 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 }, +}; |