| 1 |  |
| 2 | |
| 3 | **Neo (or New or Not) Simple (or Small or Suckless) X Image Viewer** |
| 4 | -------------------------------------------------------------------- |
| 5 | |
| 6 | nsxiv is a fork of now unmaintained [sxiv](https://github.com/muennich/sxiv) |
| 7 | with the purpose of maintaining it and adding simple, sensible features. |
| 8 | nsxiv is free software licensed under GPLv2 and aims to be easy to modify and customize. |
| 9 | |
| 10 | Please file a bug report if something does not work as documented or |
| 11 | expected in *this* repository, after making sure you are using the latest |
| 12 | release of nsxiv. Contributions are welcome, see |
| 13 | [CONTRIBUTING.md](CONTRIBUTING.md#Contribution-Guideline) for details. |
| 14 | |
| 15 | |
| 16 | Features |
| 17 | -------- |
| 18 | |
| 19 | * Basic image operations, e.g. zooming, panning, rotating |
| 20 | * Customizable key and mouse button mappings (in *config.h*) |
| 21 | * Thumbnail mode: grid of selectable previews of all images |
| 22 | * Ability to cache thumbnails for fast re-loading |
| 23 | * Basic support for multi-frame images |
| 24 | * Play GIF animations |
| 25 | * Display image information in status bar |
| 26 | * Display image name/path in X title |
| 27 | |
| 28 | |
| 29 | Screenshots |
| 30 | ----------- |
| 31 | |
| 32 | **Image mode: (Default colors)** |
| 33 | |
| 34 |  |
| 35 | |
| 36 | **Thumbnail mode: (Custom colors)** |
| 37 | |
| 38 |  |
| 39 | |
| 40 | |
| 41 | Dependencies |
| 42 | ------------ |
| 43 | |
| 44 | nsxiv requires the following software to be installed: |
| 45 | |
| 46 | * Imlib2 |
| 47 | * X11 |
| 48 | |
| 49 | The following dependencies are optional. |
| 50 | |
| 51 | * inotify : Used for auto-reloading images on change. |
| 52 | Disabled via `HAVE_INOTIFY=0` |
| 53 | * libXft, freetype2, fontconfig : Used for the status bar. |
| 54 | Disabled via `HAVE_LIBFONTS=0` |
| 55 | * giflib : Used for animated gif playback. |
| 56 | Disabled via `HAVE_LIBGIF=0`. |
| 57 | * libexif : Used for auto-orientation and exif thumbnails. |
| 58 | Disable via `HAVE_LIBEXIF=0` |
| 59 | * libwebp : Used for animated webp playback. |
| 60 | Disabled via `HAVE_LIBWEBP=0`. |
| 61 | |
| 62 | Please make sure to install the corresponding development packages in case that |
| 63 | you want to build nsxiv on a distribution with separate runtime and development |
| 64 | packages (e.g. \*-dev on Debian). |
| 65 | |
| 66 | |
| 67 | Building |
| 68 | -------- |
| 69 | |
| 70 | nsxiv is built using the commands: |
| 71 | |
| 72 | $ make |
| 73 | |
| 74 | You can pass `HAVE_X=0` to `make` to disable an optional dependency. |
| 75 | For example: |
| 76 | |
| 77 | $ make HAVE_LIBEXIF=0 |
| 78 | |
| 79 | will disable `libexif` support. Alternatively they can be disabled via editing |
| 80 | the `Makefile` directly. `OPT_DEP_DEFAULT=0` can be used to disable all |
| 81 | optional dependencies. |
| 82 | |
| 83 | Installing nsxiv: |
| 84 | |
| 85 | # make install |
| 86 | |
| 87 | Installing desktop entry: |
| 88 | |
| 89 | # make install-desktop |
| 90 | |
| 91 | Installing icons: |
| 92 | |
| 93 | # make install-icon |
| 94 | |
| 95 | Installing all of the above: |
| 96 | |
| 97 | # make install-all |
| 98 | |
| 99 | Please note, that these requires root privileges. |
| 100 | By default, nsxiv is installed using the prefix `/usr/local`, so the full path |
| 101 | of the executable will be `/usr/local/bin/nsxiv`, the `.desktop` entry will be |
| 102 | `/usr/local/share/applications/nsxiv.desktop` and the icon path will be |
| 103 | `/usr/local/share/icons/hicolor/{size}/apps/nsxiv.png`. |
| 104 | |
| 105 | You can install nsxiv into a directory of your choice by changing this command to: |
| 106 | |
| 107 | $ make PREFIX="/your/dir" install |
| 108 | |
| 109 | Example scripts are installed using `EGPREFIX` which defaults to |
| 110 | `/usr/local/share/doc/nsxiv/examples`. You can change `EGPREFIX` the same way |
| 111 | you can change `PREFIX` shown above. |
| 112 | |
| 113 | The build-time specific settings of nsxiv can be found in the file *config.h*. |
| 114 | Please check and change them, so that they fit your needs. |
| 115 | If the file *config.h* does not already exist, then you have to create it with |
| 116 | the following command: |
| 117 | |
| 118 | $ make config.h |
| 119 | |
| 120 | |
| 121 | Usage |
| 122 | ----- |
| 123 | |
| 124 | Please see man page for information on how to use nsxiv. To do so, execute the |
| 125 | following after the installation: |
| 126 | |
| 127 | $ man nsxiv |
| 128 | |
| 129 | |
| 130 | F.A.Q |
| 131 | ----- |
| 132 | |
| 133 | * Can I open remote urls with nsxiv? <br> |
| 134 | Yes, see [nsxiv-url](https://github.com/nsxiv/nsxiv-extra/tree/master/scripts/nsxiv-url) |
| 135 | |
| 136 | * Can I open all the images in a directory? <br> |
| 137 | Yes, see [nsxiv-rifle](https://github.com/nsxiv/nsxiv-extra/tree/master/scripts/nsxiv-rifle) |
| 138 | |
| 139 | * Can I set default arguments for nsxiv? <br> |
| 140 | Yes, see [nsxiv-env](https://github.com/nsxiv/nsxiv-extra/tree/master/scripts/nsxiv-env) |
| 141 | |
| 142 | * Can I pipe images into nsxiv? <br> |
| 143 | No, not yet. See [#32](https://github.com/nsxiv/nsxiv/issues/32) |
| 144 | |
| 145 | |
| 146 | User patches |
| 147 | ------------ |
| 148 | |
| 149 | Due to our limited [project scope](CONTRIBUTING.md#Project-Scope), certain features or |
| 150 | customization cannot be merged into nsxiv mainline. Following the spirit of |
| 151 | suckless software, we host the [nsxiv-extra](https://github.com/nsxiv/nsxiv-extra) |
| 152 | repo where users are free to submit whatever patches or scripts they wish. |
| 153 | |
| 154 | Description on how to use or submit patches can be found on |
| 155 | [nsxiv-extra's](https://github.com/nsxiv/nsxiv-extra) README. |
| 156 | |
| 157 | |
| 158 | Download |
| 159 | -------- |
| 160 | |
| 161 | You can [browse](https://github.com/nsxiv/nsxiv) the source code repository |
| 162 | on GitHub or get a copy using git with the following command: |
| 163 | |
| 164 | $ git clone https://github.com/nsxiv/nsxiv.git |
| 165 | |
| 166 | You can view the changelog [here](CHANGELOG.md) |