diff options
author | James Knight <james.d.knight@live.com> | 2015-06-22 12:15:37 -0400 |
---|---|---|
committer | James Knight <james.d.knight@live.com> | 2015-06-22 12:15:37 -0400 |
commit | 740daf5c8b2908211b4ae1ad2c9353688bb1e2f9 (patch) | |
tree | dfaecc4b8eea4da9eee1fe4b24d4427e0184f1e2 /src/options.c | |
parent | 5e6cbb6c8d1435b3122dfc55b6e5cfeefb1a3aab (diff) |
support background setter for specific screen
The following adds the ability, when using `feh` as a background setter,
to use a specific Xinerama screen to render a provided image. Along with
the provided '--bg-*' option, the '--xinerama-index' argument will be
used to identify the index of the detected Xinerama screen to use.
Signed-off-by: James Knight <james.d.knight@live.com>
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c index cbeb729..bff46c3 100644 --- a/src/options.c +++ b/src/options.c @@ -71,6 +71,7 @@ void init_parse_options(int argc, char **argv) /* if we're using xinerama, then enable it by default */ opt.xinerama = 1; #endif /* HAVE_LIBXINERAMA */ + opt.xinerama_index = -1; feh_getopt_theme(argc, argv); @@ -404,6 +405,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) {"no-fehbg" , 0, 0, 236}, {"keep-zoom-vp" , 0, 0, 237}, {"scroll-step" , 1, 0, 238}, + {"xinerama-index", 1, 0, 239}, {0, 0, 0, 0} }; @@ -744,6 +746,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) case 238: opt.scroll_step = atoi(optarg); break; + case 239: + opt.xinerama_index = atoi(optarg); + break; default: break; } |