Unverified Commit 918edfaa authored by reiseb's avatar reiseb
Browse files

add option 'a' to show play/paused information in slideshow mode

parent a624883d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1204,6 +1204,10 @@ file
.
.Bl -tag -width indent
.
.It %a
.
Information about slideshow state (play/pause)
.
.It %f
.
Image path/filename
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ INDEX MODE OPTIONS
                           font is specified, a title will not be printed

FORMAT SPECIFIERS
 %a     information about slideshow state (play/pause)
 %f     image path/filename
 %F     image path/filename (shell-escaped)
 %g     window dimensions (\"width,height\") in pixels
+2 −0
Original line number Diff line number Diff line
@@ -710,6 +710,8 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy
	}
	else if (feh_is_kp(EVENT_toggle_pause, state, keysym, button)) {
		slideshow_pause_toggle(winwid);
		/* We need to reload the image to update the info string immediately. */
		feh_reload_image(winwid, 0, 0);
	}
	else if (feh_is_kp(EVENT_save_image, state, keysym, button)) {
		slideshow_save_image(winwid);
+8 −0
Original line number Diff line number Diff line
@@ -397,6 +397,14 @@ char *feh_printf(char *str, feh_file * file, winwidget winwid)
		if ((*c == '%') && (*(c+1) != '\0')) {
			c++;
			switch (*c) {
	        case 'a':
	           	if (opt.paused == 1) {
	               strncat(ret, "pause", sizeof(ret) - strlen(ret) - 1);
	            }
	            else {
	               strncat(ret, "play", sizeof(ret) - strlen(ret) - 1);
	            }
	            break;
			case 'f':
				if (file)
					strncat(ret, file->filename, sizeof(ret) - strlen(ret) - 1);