aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/imv.13
-rw-r--r--src/main.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/imv.1 b/doc/imv.1
index 3b9b2d2..dc708b6 100644
--- a/doc/imv.1
+++ b/doc/imv.1
@@ -83,6 +83,9 @@ Pause gif playback (pressing again unpauses).
.TP
.B \&.
Step forward one frame (when playing gifs).
+.TP
+.B p
+Print current image path to stdout
.SH LEGAL
This software is licensed under the MIT open source license, however this
software also uses the FreeImage open source image library, which is licensed
diff --git a/src/main.c b/src/main.c
index cc06393..e60a83a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -68,6 +68,7 @@ void print_usage(const char* name)
" 'f': Toggle fullscreen\n"
" ' ': Toggle gif playback\n"
" '.': Step a frame of gif playback\n"
+ " 'p': Print current image path to stdout\n"
"\n"
"Legal:\n"
"imv is published under the MIT open source license.\n"
@@ -208,6 +209,7 @@ int main(int argc, char** argv)
case SDLK_PERIOD: imv_image_load_next_frame(&img); break;
case SDLK_SPACE: imv_viewport_toggle_playing(&view, &img);break;
case SDLK_s: imv_viewport_scale_to_window(&view, &img);break;
+ case SDLK_p: puts(imv_navigator_get_current_path(&nav));break;
}
break;
case SDL_MOUSEWHEEL: