diff options
author | root <root@rshg047.dnsready.net> | 2011-05-22 22:46:00 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-05-22 22:46:00 +0000 |
commit | 3837a11a2a471b9db222d8eb6ed7d2fb9d1778c6 (patch) | |
tree | b16474ab1e00c05c11f602c89c6ea093f8d8f0d7 /community/sxiv | |
parent | 0fdfc2325867395ad4262d06b2d89955ac3cf6a4 (diff) |
Sun May 22 22:46:00 UTC 2011
Diffstat (limited to 'community/sxiv')
-rw-r--r-- | community/sxiv/PKGBUILD | 35 | ||||
-rw-r--r-- | community/sxiv/config.h | 41 | ||||
-rw-r--r-- | community/sxiv/sxiv.desktop | 7 | ||||
-rw-r--r-- | community/sxiv/sxiv.install | 10 |
4 files changed, 93 insertions, 0 deletions
diff --git a/community/sxiv/PKGBUILD b/community/sxiv/PKGBUILD new file mode 100644 index 000000000..04e771c57 --- /dev/null +++ b/community/sxiv/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Thomas Dziedzic < gostrc at gmail > +# Contributor: Bert Muennich <muennich at informatik.hu-berlin.de> + +pkgname=sxiv +pkgver=0.8.1 +pkgrel=2 +pkgdesc='simple x image viewer' +arch=('i686' 'x86_64') +license=('GPL2') +install=('sxiv.install') +url='https://github.com/muennich/sxiv' +depends=('libx11' 'xproto' 'imlib2') +source=("https://github.com/downloads/muennich/sxiv/sxiv-${pkgver}.tar.gz" + 'sxiv.desktop' + 'config.h') +md5sums=('23006a1900690d46c0ff126c76cdbd02' + '0b6d43bd356aadc12537c010950e2272' + '8018e9f2f63b155098428be9dbaf8b5c') + +build() { + cd sxiv-${pkgver} + + cp ${srcdir}/config.h . + + make +} + +package() { + cd sxiv-${pkgver} + + make PREFIX=${pkgdir}/usr install + + install -D -m644 ${srcdir}/sxiv.desktop \ + ${pkgdir}/usr/share/applications/sxiv.desktop +} diff --git a/community/sxiv/config.h b/community/sxiv/config.h new file mode 100644 index 000000000..14a65bd4f --- /dev/null +++ b/community/sxiv/config.h @@ -0,0 +1,41 @@ +/* default window dimensions (overwritten via -g option): */ +#define WIN_WIDTH 800 +#define WIN_HEIGHT 600 + +/* default color for window background: * + * (see X(7) "COLOR NAMES" section for valid values) */ +#define BG_COLOR "#999999" +/* default color for thumbnail selection: */ +#define SEL_COLOR "#0040FF" + +/* how should images be scaled when they are loaded?: * + * (also controllable via -d/-s/-Z/-z options) * + * SCALE_DOWN: 100%, but fit large images into window, * + * SCALE_FIT: fit all images into window, * + * SCALE_ZOOM: use current zoom level, 100% at startup */ +#define SCALE_MODE SCALE_DOWN + +/* levels (percent) to use when zooming via '-' and '+': */ +static const float zoom_levels[] = { + 12.5, 25.0, 50.0, 75.0, + 100.0, 150.0, 200.0, 400.0, 800.0 +}; + +/* default dimension of thumbnails (width == height): */ +#define THUMB_SIZE 60 + +/* enable external commands (defined below)? 0=off, 1=on: */ +#define EXT_COMMANDS 0 + +/* external commands and corresponding key mappings: */ +#ifdef MAIN_C +#if EXT_COMMANDS +static const command_t commands[] = { + /* ctrl-... reload? command, '#' is replaced by filename */ + { XK_comma, True, "jpegtran -rotate 270 -copy all -outfile # #" }, + { XK_period, True, "jpegtran -rotate 90 -copy all -outfile # #" }, + { XK_less, True, "mogrify -rotate -90 #" }, + { XK_greater, True, "mogrify -rotate +90 #" } +}; +#endif +#endif diff --git a/community/sxiv/sxiv.desktop b/community/sxiv/sxiv.desktop new file mode 100644 index 000000000..f510d49ea --- /dev/null +++ b/community/sxiv/sxiv.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=sxiv +GenericName=Image Viewer +Exec=sxiv %f +MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/png;image/tiff;image/x-bmp; +NoDisplay=true diff --git a/community/sxiv/sxiv.install b/community/sxiv/sxiv.install new file mode 100644 index 000000000..02fd31189 --- /dev/null +++ b/community/sxiv/sxiv.install @@ -0,0 +1,10 @@ +post_install () { + echo "* Look into config.h to customize sxiv to your needs." + echo " Use 'makepkg --skipinteg' to rebuild the package after changing config.h." + echo "* Create the directory ~/.sxiv/ to enable thumbnail caching." + echo " See sxiv(1) for more information." +} + +post_upgrade () { + post_install ${1} +} |