diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/help.raw | 1 | ||||
-rw-r--r-- | src/keyevents.c | 2 | ||||
-rw-r--r-- | src/slideshow.c | 8 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/help.raw b/src/help.raw index 8d30544..0a87b70 100644 --- a/src/help.raw +++ b/src/help.raw @@ -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 diff --git a/src/keyevents.c b/src/keyevents.c index 0da07d3..761ec3c 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -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); diff --git a/src/slideshow.c b/src/slideshow.c index 00425d1..2cc8c4f 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -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); |