| 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 | Installing via package manager |
| 42 | ------------------------------ |
| 43 | |
| 44 | nsxiv is available on the following distributions/repositories. If you don't see |
| 45 | your distro listed here, either contact your distro's package maintainer or |
| 46 | consider packaging it yourself and adding it to the respective community repo. |
| 47 | |
| 48 | [](https://repology.org/project/nsxiv/versions) |
| 49 | |
| 50 | Repos not tracked by repology: |
| 51 | |
| 52 | * Fedora: Enable the copr repo via `dnf copr enable mamg22/nsxiv`. |
| 53 | |
| 54 | |
| 55 | Dependencies |
| 56 | ------------ |
| 57 | |
| 58 | nsxiv requires the following software to be installed: |
| 59 | |
| 60 | * Imlib2 |
| 61 | * X11 |
| 62 | |
| 63 | The following dependencies are optional. |
| 64 | |
| 65 | * inotify : Used for auto-reloading images on change. |
| 66 | Disabled via `HAVE_INOTIFY=0` |
| 67 | * libXft, freetype2, fontconfig : Used for the status bar. |
| 68 | Disabled via `HAVE_LIBFONTS=0` |
| 69 | * giflib : Used for animated gif playback. |
| 70 | Disabled via `HAVE_LIBGIF=0`. |
| 71 | * libexif : Used for auto-orientation and exif thumbnails. |
| 72 | Disable via `HAVE_LIBEXIF=0` |
| 73 | * libwebp : Used for animated webp playback. |
| 74 | Disabled via `HAVE_LIBWEBP=0`. |
| 75 | |
| 76 | Please make sure to install the corresponding development packages in case that |
| 77 | you want to build nsxiv on a distribution with separate runtime and development |
| 78 | packages (e.g. \*-dev on Debian). |
| 79 | |
| 80 | |
| 81 | Building |
| 82 | -------- |
| 83 | |
| 84 | nsxiv is built using the commands: |
| 85 | |
| 86 | $ make |
| 87 | |
| 88 | You can pass `HAVE_X=0` to `make` to disable an optional dependency. |
| 89 | For example: |
| 90 | |
| 91 | $ make HAVE_LIBEXIF=0 |
| 92 | |
| 93 | will disable `libexif` support. Alternatively they can be disabled via editing |
| 94 | the `Makefile` directly. `OPT_DEP_DEFAULT=0` can be used to disable all |
| 95 | optional dependencies. |
| 96 | |
| 97 | Installing nsxiv: |
| 98 | |
| 99 | # make install |
| 100 | |
| 101 | Installing desktop entry: |
| 102 | |
| 103 | # make install-desktop |
| 104 | |
| 105 | Installing icons: |
| 106 | |
| 107 | # make install-icon |
| 108 | |
| 109 | Installing all of the above: |
| 110 | |
| 111 | # make install-all |
| 112 | |
| 113 | Please note, that these requires root privileges. |
| 114 | By default, nsxiv is installed using the prefix `/usr/local`, so the full path |
| 115 | of the executable will be `/usr/local/bin/nsxiv`, the `.desktop` entry will be |
| 116 | `/usr/local/share/applications/nsxiv.desktop` and the icon path will be |
| 117 | `/usr/local/share/icons/hicolor/{size}/apps/nsxiv.png`. |
| 118 | |
| 119 | You can install nsxiv into a directory of your choice by changing this command to: |
| 120 | |
| 121 | $ make PREFIX="/your/dir" install |
| 122 | |
| 123 | Example scripts are installed using `EGPREFIX` which defaults to |
| 124 | `/usr/local/share/doc/nsxiv/examples`. You can change `EGPREFIX` the same way |
| 125 | you can change `PREFIX` shown above. |
| 126 | |
| 127 | The build-time specific settings of nsxiv can be found in the file *config.h*. |
| 128 | Please check and change them, so that they fit your needs. |
| 129 | If the file *config.h* does not already exist, then you have to create it with |
| 130 | the following command: |
| 131 | |
| 132 | $ make config.h |
| 133 | |
| 134 | |
| 135 | Usage |
| 136 | ----- |
| 137 | |
| 138 | Please see man page for information on how to use nsxiv. To do so, execute the |
| 139 | following after the installation: |
| 140 | |
| 141 | $ man nsxiv |
| 142 | |
| 143 | |
| 144 | F.A.Q |
| 145 | ----- |
| 146 | |
| 147 | * Can I open remote urls with nsxiv? <br> |
| 148 | Yes, see [nsxiv-url](https://github.com/nsxiv/nsxiv-extra/tree/master/scripts/nsxiv-url) |
| 149 | |
| 150 | * Can I open all the images in a directory? <br> |
| 151 | Yes, see [nsxiv-rifle](https://github.com/nsxiv/nsxiv-extra/tree/master/scripts/nsxiv-rifle) |
| 152 | |
| 153 | * Can I set default arguments for nsxiv? <br> |
| 154 | Yes, see [nsxiv-env](https://github.com/nsxiv/nsxiv-extra/tree/master/scripts/nsxiv-env) |
| 155 | |
| 156 | * Can I pipe images into nsxiv? <br> |
| 157 | Yes, see [nsxiv-pipe](https://github.com/nsxiv/nsxiv-extra/tree/master/scripts/nsxiv-pipe) |
| 158 | |
| 159 | |
| 160 | User patches |
| 161 | ------------ |
| 162 | |
| 163 | Due to our limited [project scope](CONTRIBUTING.md#Project-Scope), certain features or |
| 164 | customization cannot be merged into nsxiv mainline. Following the spirit of |
| 165 | suckless software, we host the [nsxiv-extra](https://github.com/nsxiv/nsxiv-extra) |
| 166 | repo where users are free to submit whatever patches or scripts they wish. |
| 167 | |
| 168 | Description on how to use or submit patches can be found on |
| 169 | [nsxiv-extra's](https://github.com/nsxiv/nsxiv-extra) README. |
| 170 | |
| 171 | |
| 172 | Download |
| 173 | -------- |
| 174 | |
| 175 | You can [browse](https://github.com/nsxiv/nsxiv) the source code repository |
| 176 | on GitHub or get a copy using git with the following command: |
| 177 | |
| 178 | $ git clone https://github.com/nsxiv/nsxiv.git |
| 179 | |
| 180 | You can view the changelog [here](CHANGELOG.md) |