瀏覽代碼

Added documentation for image-info script

master
Bert Münnich 12 年之前
父節點
當前提交
9c0a53bc34
共有 4 個檔案被更改,包括 35 行新增13 行删除
  1. +6
    -2
      Makefile
  2. +2
    -2
      README.md
  3. +12
    -5
      image-info
  4. +15
    -4
      sxiv.1

+ 6
- 2
Makefile 查看文件

@@ -1,4 +1,4 @@
VERSION = git-20130112 VERSION = git-20130127


PREFIX = /usr/local PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man MANPREFIX = $(PREFIX)/share/man
@@ -32,9 +32,13 @@ install: all
cp sxiv $(DESTDIR)$(PREFIX)/bin/ cp sxiv $(DESTDIR)$(PREFIX)/bin/
chmod 755 $(DESTDIR)$(PREFIX)/bin/sxiv chmod 755 $(DESTDIR)$(PREFIX)/bin/sxiv
mkdir -p $(DESTDIR)$(MANPREFIX)/man1 mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
mkdir -p $(DESTDIR)$(PREFIX)/share/sxiv/exec
cp image-info $(DESTDIR)$(PREFIX)/share/sxiv/exec/image-info
chmod 755 $(DESTDIR)$(PREFIX)/share/sxiv/exec/image-info


uninstall: uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/sxiv rm -f $(DESTDIR)$(PREFIX)/bin/sxiv
rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 rm -f $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
rm -rf $(DESTDIR)$(PREFIX)/share/sxiv

+ 2
- 2
README.md 查看文件

@@ -1,7 +1,7 @@
sxiv sxiv
==== ====


**Simple (or small or suckless) X Image Viewer** **Simple X Image Viewer**


sxiv is an alternative to feh and qiv. Its only dependencies besides xlib are sxiv is an alternative to feh and qiv. Its only dependencies besides xlib are
imlib2 and giflib. The primary goal for writing sxiv is to create an image imlib2 and giflib. The primary goal for writing sxiv is to create an image
@@ -20,7 +20,7 @@ Features
* Ability to cache thumbnails for fast re-loading * Ability to cache thumbnails for fast re-loading
* Basic support for multi-frame images * Basic support for multi-frame images
* Load all frames from GIF files and play GIF animations * Load all frames from GIF files and play GIF animations
* Display image information in window title * Display image information in status bar




Screenshots Screenshots


+ 12
- 5
image-info 查看文件

@@ -1,10 +1,17 @@
#!/bin/sh #!/bin/sh


#filename=$1 # Example for ~/.sxiv/exec/image-info
#filesize=$(du -h "$1") # Called by sxiv(1) whenever an image gets loaded,
# with the name of the image file as its first argument.
# The output is displayed in sxiv's status bar.


#geometry=$(identify -format '%wx%h' "$1") filename=$(basename "$1")
filesize=$(du -h "$1" | cut -f 1)


#tags=$(exiv2 -q pr -pi "$1" | awk '$1~"Keywords" {print $4","}') geometry=$(identify -format '%wx%h' "$1")
#tags=${tags%,} tags=$(exiv2 -q pr -pi "$1" | awk '$1~"Keywords" { printf("%s,", $4); }')
tags=${tags:+|}${tags%,}

echo "[$filesize|$geometry$tags] $filename"



+ 15
- 4
sxiv.1 查看文件

@@ -1,6 +1,6 @@
.TH SXIV 1 sxiv\-VERSION .TH SXIV 1 sxiv\-VERSION
.SH NAME .SH NAME
sxiv \- Simple (or small or suckless) X Image Viewer sxiv \- Simple X Image Viewer
.SH SYNOPSIS .SH SYNOPSIS
.B sxiv .B sxiv
.RB [ \-bcdFfhpqrstvZ ] .RB [ \-bcdFfhpqrstvZ ]
@@ -306,6 +306,15 @@ Pan image left.
.TP .TP
.B Shift+ScrollDown .B Shift+ScrollDown
Pan image right. Pan image right.
.SH STATUS BAR
The information displayed on the left side of the status bar can be replaced
with the output of a user-provided script, which is called by sxiv whenever an
image gets loaded. The path of this script is
.I ~/.sxiv/exec/image-info
and the first argument to this script is the path of the loaded image.
.P
There is also an example script installed together with sxiv as
.IR PREFIX/share/sxiv/exec/image-info .
.SH THUMBNAIL CACHING .SH THUMBNAIL CACHING
To enable thumbnail caching, please make sure to create the directory To enable thumbnail caching, please make sure to create the directory
.I ~/.sxiv/cache/ .I ~/.sxiv/cache/
@@ -325,17 +334,19 @@ find . \-depth \-type d \-empty ! \-name '.' \-exec rmdir {} \\;
.RE .RE
.SH AUTHOR .SH AUTHOR
.EX .EX
Bert Muennich <ber.t at gmx.com> Bert Muennich <be.muennich @ gmail.com>
.EE .EE
.SH CONTRIBUTORS .SH CONTRIBUTORS
.EX .EX
Bastien Dejean <nihilhill at gmail.com> Bastien Dejean <nihilhill at gmail.com>
Dave Reisner <d at falconindy.com> Dave Reisner <d at falconindy.com>
Fung SzeTat <sthorde at gmail.com> Fung SzeTat <sthorde at gmail.com>
.EX .EE
.SH HOMEPAGE .SH HOMEPAGE
.TP .EX
http://muennich.github.com/sxiv
https://github.com/muennich/sxiv https://github.com/muennich/sxiv
.EE
.SH SEE ALSO .SH SEE ALSO
.BR feh (1), .BR feh (1),
.BR qiv (1) .BR qiv (1)

||||||
x
 
000:0
Loading…
取消
儲存