From 5a682426b128fd33bd76f466831a9a36e80e1c2c Mon Sep 17 00:00:00 2001 From: Bert Date: Mon, 31 Jan 2011 16:06:40 +0100 Subject: [PATCH] New key command: r, reload image --- README.md | 19 ++++++++++--------- main.c | 3 +++ sxiv.1 | 3 +++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9f2c33e..8df7a38 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,16 @@ Usage ----- sxiv supports the following command-line options: - -d scale all images to 100%, but fit large images into window - -f start in fullscreen mode - -g GEOMETRY set window position and size + -d Scale all images to 100%, but fit large images into window + -f Start in fullscreen mode + -g GEOMETRY Set window position and size (see section GEOMETRY SPECIFICATIONS of X(7)) - -p pixelize, i.e. turn off image anti-aliasing - -q be quiet, disable warnings - -s scale all images to fit into window - -v print version information and exit - -Z same as `-z 100' - -z ZOOM scale all images to current zoom level, use ZOOM at startup + -p Pixelize, i.e. turn off image anti-aliasing + -q Be quiet, disable warnings + -s Scale all images to fit into window + -v Print version information and exit + -Z Same as `-z 100' + -z ZOOM Scale all images to current zoom level, use ZOOM at startup Use the following keys to control sxiv: @@ -56,6 +56,7 @@ Use the following keys to control sxiv: f Toggle fullscreen mode (requires an EWMH/NetWM compliant window manager) a Toggle anti-aliasing + r Reload image Additionally, sxiv can be controlled via the following mouse commands: diff --git a/main.c b/main.c index 4771cd9..96cf10e 100644 --- a/main.c +++ b/main.c @@ -235,6 +235,9 @@ void on_keypress(XEvent *ev) { case XK_a: changed = img_toggle_antialias(&img); break; + case XK_r: + changed = img_load(&img, filenames[fileidx]); + break; } if (changed) { diff --git a/sxiv.1 b/sxiv.1 index 47fd271..a922813 100644 --- a/sxiv.1 +++ b/sxiv.1 @@ -112,6 +112,9 @@ Toggle fullscreen mode. .TP .B a Toggle anti-aliasing. +.TP +.B r +Reload image. .SH MOUSE COMMANDS .SS Navigate image list .TP