From 740daf5c8b2908211b4ae1ad2c9353688bb1e2f9 Mon Sep 17 00:00:00 2001 From: James Knight Date: Mon, 22 Jun 2015 12:15:37 -0400 Subject: 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 --- src/options.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/options.c') 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; } -- cgit v1.2.3