From d3da0eb71e279f394803eea99f3b1be7b94bd511 Mon Sep 17 00:00:00 2001 From: Bert Date: Sun, 23 Jan 2011 18:20:08 +0100 Subject: Added man page --- Makefile | 3 +++ TODO | 1 - main.c | 4 ++-- sxiv.1 | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 sxiv.1 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 +.SH MISC +.SS Homepage +.TP +http://github.com/muennich/sxiv +.SH SEE ALSO +.BR feh (1), qiv (1) -- cgit v1.2.3