aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-01-23 18:20:08 +0100
committerBert <ber.t@gmx.com>2011-01-23 18:20:08 +0100
commitd3da0eb71e279f394803eea99f3b1be7b94bd511 (patch)
treeee00574b917fae966a0494b706ca43a74ac164ec
parentbce599038ceac361c09e9d715e8c94716d6c3d0c (diff)
Added man page
-rw-r--r--Makefile3
-rw-r--r--TODO1
-rw-r--r--main.c4
-rw-r--r--sxiv.179
4 files changed, 84 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 253d015..98dc765 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,9 @@ sxiv: $(OBJFILES)
install: all
install -D -m 4755 -o root -g root sxiv $(PREFIX)/sbin/sxiv
+ mkdir -p $(PREFIX)/share/man/man1
+ sed "s/VERSION/$(VERSION)/g" dwm.1 > $(PREFIX)/share/man/man1/sxiv.1
+ chmod 644 $(PREFIX)/share/man/man1/sxiv.1
clean:
rm -f sxiv *.o
diff --git a/TODO b/TODO
index fadb409..1f50727 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,4 @@
- mouse scrolling and zooming
- add some useful command line options
-- write man page
- toggle aliasing
- view all images in directories (recursive mode)
diff --git a/main.c b/main.c
index fca12e8..9b7ed6b 100644
--- a/main.c
+++ b/main.c
@@ -154,7 +154,7 @@ void on_keypress(XEvent *ev) {
cleanup();
exit(0);
- /* navigate through image list */
+ /* navigate image list */
case 'n':
if (fileidx + 1 < filecnt) {
img_load(&img, filenames[++fileidx]);
@@ -219,7 +219,7 @@ void on_keypress(XEvent *ev) {
changed = img_pan(&img, &win, PAN_RIGHT);
break;
- /* change window state */
+ /* Control window */
case 'f':
win_toggle_fullscreen(&win);
break;
diff --git a/sxiv.1 b/sxiv.1
new file mode 100644
index 0000000..9465384
--- /dev/null
+++ b/sxiv.1
@@ -0,0 +1,79 @@
+.TH SXIV 1 sxiv\-VERSION
+.SH NAME
+sxiv \- Simple (or small or suckless) X Image Viewer
+.SH SYNOPSIS
+.B sxiv
+.RB [ \-hv ]
+.SH DESCRIPTION
+sxiv is a simple image viewer for X. It only has the most basic features
+required for fast image viewing.
+.P
+Please note, that the fullscreen mode requires an EWMH/NetWM compliant window
+manager.
+.SH OPTIONS
+.TP
+.B \-h
+Print brief usage information to standard output and exit.
+.TP
+.B \-v
+Print version information to standard output and exit.
+.SH KEYBOARD COMMANDS
+.SS General
+.TP
+.B q
+Quit sxiv.
+.TP
+.B Escape
+Quit sxiv and return an exit value of 2.
+.SS Navigate image list
+.TP
+.BR Space ", " n
+Go to the next image.
+.TP
+.BR Backspace ", " p
+Go to the previous image.
+.TP
+.B g
+Go to the first image.
+.TP
+.B G
+Go to the last image.
+.TP
+.B [
+Go 10 images backward.
+.TP
+.B ]
+Go 10 images forward.
+.SS Zooming
+.TP
+.BR + ", " =
+Zoom in.
+.TP
+.B \-
+Zoom out.
+.SS Panning
+.TP
+.B h
+Pan left.
+.TP
+.B j
+Pan down.
+.TP
+.B k
+Pan up.
+.TP
+.B l
+Pan right.
+.SS Control window
+.TP
+.B f
+Toggle fullscreen mode.
+.SH AUTHORS
+.TP
+Bert Muennich <ber.t at gmx.com>
+.SH MISC
+.SS Homepage
+.TP
+http://github.com/muennich/sxiv
+.SH SEE ALSO
+.BR feh (1), qiv (1)