Krolyxon
Commit ea80c73

Branches

Refs →

nsxivea80c73

Fixed title for thumbnail mode

Author
Bert
Date
2011-02-21 16:49 +0100
Parent
f2b8a75
Commit
ea80c735207d72b22a953374296a5255d903ba4e

+25 −7

3 files changed

  1. M Makefile +1 −1
  2. M README.md +22 −4
  3. M main.c +2 −2
M Makefile View
@@ -4,7 +4,7 @@ VERSION=git-20110221
44
55 CC?=gcc
66 PREFIX?=/usr/local
7−CFLAGS+= -Wall -pedantic -DVERSION=\"$(VERSION)\" -g
7+CFLAGS+= -Wall -pedantic -DVERSION=\"$(VERSION)\"
88 LDFLAGS+=
99 LIBS+= -lX11 -lImlib2
1010
M README.md View
@@ -28,6 +28,10 @@ check and change them, so that they fit your needs.
2828
2929 Usage
3030 -----
31+sxiv has two modes of operation: image and thumbnail mode. The default is image
32+mode, in which only the current image is shown. In thumbnail mode a grid of
33+small previews is displayed, making it easy to choose an image to open.
34+
3135 sxiv supports the following command-line options:
3236
3337 -d Scale all images to 100%, but fit large images into window
@@ -39,14 +43,21 @@ sxiv supports the following command-line options:
3943 -q Be quiet, disable warnings
4044 -r Search given directories recursively for images
4145 -s Scale all images to fit into window
46+ -t Start in thumbnail mode
4247 -v Print version information and exit
4348 -Z Same as `-z 100'
4449 -z ZOOM Scale all images to current zoom level, use ZOOM at startup
4550
46−Use the following keys to control sxiv:
51+Use the following keys to control the basic behaviour of sxiv:
4752
4853 q Quit sxiv
4954 Escape Quit sxiv and return an exit value of 2 (useful for scripting)
55+ Return Switch operation mode
56+ f Toggle fullscreen mode (requires an EWMH/NetWM compliant
57+ window manager)
58+
59+Inside image view mode, the following key mappings are available:
60+
5061 n,Space Go to the next image
5162 p,Backspace Go to the previous image
5263 g/G Go to first/last image
@@ -58,12 +69,10 @@ Use the following keys to control sxiv:
5869 h,j,k,l Pan image left/down/up/right (also with arrow keys)
5970 <,> Rotate image (counter-)clockwise by 90 degrees
6071 W Resize window to fit image
61− f Toggle fullscreen mode (requires an EWMH/NetWM compliant
62− window manager)
6372 a Toggle anti-aliasing
6473 r Reload image
6574
66−Additionally, sxiv can be controlled via the following mouse commands:
75+Additionally, the image view offers the following mouse commands:
6776
6877 Button1 Go to the next image
6978 Button2 Drag image with mouse while keeping it pressed
@@ -74,3 +83,12 @@ Additionally, sxiv can be controlled via the following mouse commands:
7483 Shift+ScrollDown Pan image right
7584 Ctrl+ScrollUp Zoom in
7685 Ctrl+ScrollDown Zoom out
86+
87+In thumbnail mode, the following key and mouse mappings are available:
88+
89+ h,j,k,l Move selection left/down/up/right (also with arrow keys)
90+ g/G Move selection to first/last image
91+
92+ Button1 Select image/open image if it is already selected
93+ ScrollUp Scroll up one row
94+ ScrollDown Scroll down one row
M main.c View
@@ -155,8 +155,8 @@ void update_title() {
155155
156156 if (mode == MODE_THUMBS) {
157157 n = snprintf(win_title, TITLE_LEN, "sxiv: [%d/%d] %s",
158− tns.cnt ? fileidx + 1 : 0, tns.cnt,
159− tns.cnt ? filenames[fileidx] : "");
158+ tns.cnt ? tns.sel + 1 : 0, tns.cnt,
159+ tns.cnt ? filenames[tns.sel] : "");
160160 } else {
161161 if (img.valid) {
162162 size = filesize;