diff options
| -rw-r--r-- | man/feh.pre | 42 | ||||
| -rw-r--r-- | src/getopt.c | 1 | ||||
| -rw-r--r-- | src/options.c | 12 | ||||
| -rw-r--r-- | src/options.h | 2 | 
4 files changed, 34 insertions, 23 deletions
| diff --git a/man/feh.pre b/man/feh.pre index 0d8e5ab..8be5a6f 100644 --- a/man/feh.pre +++ b/man/feh.pre @@ -933,26 +933,26 @@ which does not expect  to draw into it or attempt to use options or keybindings which affect window  attributes, such as full-screen mode.  . -.It Cm --xinerama-index Ar screen +.It Cm --xinerama-index Ar monitor  .  .Pq optional feature, $MAN_XINERAMA$ in this build  Override  .Nm Ns No 's -idea of the active Xinerama screen. +idea of the active Xinerama monitor.  May be useful in certain circumstances where the window manager places the feh -window on Xinerama screen A while +window on Xinerama monitor A while  .Nm -assumes that it will be placed on screen B. +assumes that it will be placed on monitor B.  .  .Pp  .  In background setting mode: When used with any option other than  .Cm --bg-tile :  Only set wallpaper on -.Ar screen . -All other screens will be filled black/white. +.Ar monitor . +All other monitors will be filled black/white.  . -This is most useful in a Xinerama configuration with overlapping screens. +This is most useful in a Xinerama configuration with overlapping monitors.  For instance, assume you have two overlapping displays (index 0 and 1),  where index 0 is smaller.  To center a background on the display with index 0 and fill the extra space @@ -960,6 +960,13 @@ on index 1 black/white, use  .Qq --xinerama-index 0  when setting the wallpaper.  . +.Pp +. +Use +.Cm xrandr --listmonitor +to determine how Xinerama monitor IDs map to screens/monitors in your setup. +. +.  .It Cm --zoom Ar percent | Cm max | Cm fill  .  Zoom images by @@ -981,11 +988,11 @@ zoom the image like the  .Cm --bg-fill  mode.  . -.It Cm --zoom-rate Ar ratio +.It Cm --zoom-step Ar percent  .  Zoom images in and out by -.Ar ratio -.Pq default: 1.25 +.Ar percent +.Pq default: 25  when using the zoom keys and buttons.  .  .El @@ -1167,7 +1174,7 @@ and  .Cm --bg-max ,  you can use  .Cm --geometry -to specify an offset from one side of the screen instead of centering the image. +to specify an offset from one side of the monitor instead of centering the image.  Positive values will offset from the left/top side, negative values from the  bottom/right.  +0 and -0 are both valid and distinct values. @@ -1177,23 +1184,26 @@ bottom/right.  Note that all options except  .Cm --bg-tile  support Xinerama. -For instance, if you have multiple screens connected and use e.g. +For instance, if you have multiple monitors connected and use e.g.  .Cm --bg-center ,  .Nm -will center or appropriately offset the image on each screen. +will center or appropriately offset the image on each monitor.  You may even specify more than one file, in that case, the first file is set -on screen 0, the second on screen 1, and so on. +on monitor 0, the second on monitor 1, and so on. +Use +.Cm xrandr --listmonitor +to determine how Xinerama monitor IDs map to screens / monitors in your setup.  .  .Pp  .  Use  .Cm --no-xinerama -to treat the whole X display as one screen when setting wallpapers. +to treat the whole X display as one monitor when setting wallpapers.  You may also use  .Cm --xinerama-index  to use  .Nm -as a background setter for a specific screen. +as a background setter for a specific monitor.  .  .Bl -tag -width indent  . diff --git a/src/getopt.c b/src/getopt.c index d212b3a..eaae3f7 100644 --- a/src/getopt.c +++ b/src/getopt.c @@ -36,6 +36,7 @@  #endif  #include <stdio.h> +#include <string.h>  /* Comment out all this code if we are using the GNU C Library, and are not     actually compiling the library itself.  This code is part of the GNU C diff --git a/src/options.c b/src/options.c index 1a89d5b..a77c163 100644 --- a/src/options.c +++ b/src/options.c @@ -395,7 +395,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)  		{"bg-center"     , 0, 0, OPTION_bg_center},  		{"bg-scale"      , 0, 0, OPTION_bg_scale},  		{"zoom"          , 1, 0, OPTION_zoom}, -		{"zoom-rate"     , 1, 0, OPTION_zoom_rate}, +		{"zoom-step"     , 1, 0, OPTION_zoom_step},  		{"no-screen-clip", 0, 0, OPTION_no_screen_clip},  		{"index-info"    , 1, 0, OPTION_index_info},  		{"magick-timeout", 1, 0, OPTION_magick_timeout}, @@ -840,13 +840,13 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)  		case OPTION_window_id:  			opt.x11_windowid = atol(optarg);  			break; -		case OPTION_zoom_rate: +		case OPTION_zoom_step:  			opt.zoom_rate = atof(optarg); -			if ((opt.zoom_rate <= 0.0) || (opt.zoom_rate == 1.0)) { -				weprintf("Zooming disabled due to --zoom-rate=%f", opt.zoom_rate); +			if ((opt.zoom_rate <= 0)) { +				weprintf("Zooming disabled due to --zoom-step=%f", opt.zoom_rate);  				opt.zoom_rate = 1.0; -			} else if (opt.zoom_rate < 1.0) { -				opt.zoom_rate = 1.0 / opt.zoom_rate; +			} else { +				opt.zoom_rate = 1 + ((float)opt.zoom_rate / 100);  			}  			break;  		default: diff --git a/src/options.h b/src/options.h index ea76b24..6441e8b 100644 --- a/src/options.h +++ b/src/options.h @@ -216,7 +216,7 @@ OPTION_bg_scale,  OPTION_bg_fill,  OPTION_bg_max,  OPTION_zoom, -OPTION_zoom_rate, +OPTION_zoom_step,  OPTION_zoom_in_rate,  OPTION_zoom_out_rate,  OPTION_keep_zoom_vp, | 
