aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-12 13:12:44 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-12 13:12:44 +0000
commit9cd0c1bd65cd056cdbc36cb3b9afa892e52553cf (patch)
tree4e3fee2ac10d53a9465d905c8d6744b498a03986
parent0f7b7cfda8eae35f0c68d1f50934f80bef7441f8 (diff)
downloadimv-9cd0c1bd65cd056cdbc36cb3b9afa892e52553cf.tar.gz
Print current image path to stdout
Fixes #10
-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: