From 6f9b4f5b2ed5a82ad4711d1add9ccd620d8526ba Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Mon, 29 Oct 2012 00:53:50 +0100 Subject: New option: -N, set X window resource name --- options.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index deec097..224fa2c 100644 --- a/options.c +++ b/options.c @@ -33,7 +33,7 @@ const options_t *options = (const options_t*) &_options; void print_usage(void) { printf("usage: sxiv [-bcdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] " - "[-z ZOOM] FILES...\n"); + "[-N name] [-z ZOOM] FILES...\n"); } void print_version(void) { @@ -54,12 +54,13 @@ void parse_options(int argc, char **argv) { _options.fullscreen = false; _options.hide_bar = false; _options.geometry = NULL; + _options.res_name = NULL; _options.quiet = false; _options.thumb_mode = false; _options.clean_cache = false; - while ((opt = getopt(argc, argv, "bcdFfg:hn:pqrstvZz:")) != -1) { + while ((opt = getopt(argc, argv, "bcdFfg:hn:N:pqrstvZz:")) != -1) { switch (opt) { case '?': print_usage(); @@ -94,6 +95,9 @@ void parse_options(int argc, char **argv) { _options.startnum = t - 1; } break; + case 'N': + _options.res_name = optarg; + break; case 'p': _options.aa = false; break; -- cgit v1.2.3-54-g00ecf