diff options
-rw-r--r-- | PACKAGERS.md | 19 | ||||
-rw-r--r-- | README.md | 46 | ||||
-rw-r--r-- | config.mk | 4 |
3 files changed, 53 insertions, 16 deletions
diff --git a/PACKAGERS.md b/PACKAGERS.md index 3339174..aaa08b1 100644 --- a/PACKAGERS.md +++ b/PACKAGERS.md @@ -3,7 +3,20 @@ This document is a quick summary of all you need to know to package imv for your favourite operating system. -## 1. Select backends +## 1. Select window systems to support + +Your options here are Wayland or X11, or both. By default both are included, +with a separate binary for each being built. `/usr/bin/imv` will be a script +that checks for a Wayland compositor before running the appropriate binary. + +If you only care about one of these, you can specify to build only one of these +in [config.mk](config.mk), in which case only that binary shall be packaged +without the need for a launcher script to select between the two. + +Alternatively, you could provide separate packages for X11 and Wayland that +act as alternatives to each other. + +## 2. Select backends to include imv supports multiple "backends" in a plugin style architecture. Each backend provides support for different image formats using different underlying @@ -17,13 +30,13 @@ You can configure the backends to use in [config.mk](config.mk). Sensible defaults are pre-configured to provide maximum coverage with the least overlap and fewest dependencies. -## 2. $ make && make install +## 3. $ make && make install Once your backends have been configured and you've confirmed the library each backend uses is installed, you can simply follow the Installation section of the [README](README.md) to build imv. -## 3. Package +## 4. Package Package the resulting binary and man pages in your operating system's native package format. @@ -11,13 +11,13 @@ Features -------- * Native Wayland and X11 support -* Support for over 30 different image file formats including: +* Support for dozens of image formats including: * Photoshop PSD files - * Animated GIFS + * Animated GIFs * Various RAW formats * SVG * Configurable key bindings and behaviour -* Controllable via scripts using `imv-msg` +* Highly scriptable with IPC via imv-msg Example Usage ------------- @@ -44,13 +44,36 @@ For full documentation see the man page. curl http://somesi.te/img.png | imv - ### Advanced use + imv can be used to select images in a pipeline by using the `p` hotkey to print the current image's path to stdout. The `-l` flag can also be used to tell imv to list the remaining paths on exit for a "open set of images, close unwanted ones with `x`, then quit imv to pass the remaining images through" workflow. -Through custom bindings, imv can be configured to perform almost any action -you like. +Key bindings can be customised to run arbitrary shell commands. Environment +variables are exported to expose imv's state to scripts run by it. These +scripts can in turn modify imv's behaviour by invoking `imv-msg` with +`$imv_pid`. + +For example: + + #!/usr/bin/bash + imv "$@" & + imv_pid = $! + + while true; do + # Some custom logic + # ... + + # Close all open files + imv-msg $imv_pid close all + # Open some new files + imv-msg $imv_pid open ~/new_path + + # Run another script against the currently open file + imv-msg $imv_pid exec another-script.sh $imv_current_file + done + #### Deleting unwanted images In your imv config: @@ -90,14 +113,15 @@ To cycle through a folder of pictures, showing each one for 10 seconds: imv -t 10 ~/Pictures/London -The `-x` switch can be used to exit imv after the last picture instead of -cycling through the list. - Installation ------------ -`imv` depends on `pthreads`, `FontConfig`, `SDL2`, `SDL_TTF` and `asciidoc`. -Additional dependencies are determined by which backends are selected when +`imv` depends on `pthreads`, `xkbcommon`, and `pangocairo`. + +For X11 support, `X11`, `GLU`, `xcb`, and `xkbcommon-x11` are required. +For Wayland support, `wayland-client`, `EGL`, and `wayland-egl` are required. + +Additional dependencies are added depending on which backends are selected when building `imv`. You can find a summary of which backends are available and control which ones `imv` is built with in [config.mk](config.mk) @@ -119,7 +143,7 @@ mode to inspect commands issued by make: Tests ----- -`imv` has a work-in-progress test suite. The test suite requires `cmocka`. +`imv` has an almost non-existent test suite. The test suite requires `cmocka`. $ make check @@ -2,8 +2,8 @@ #Choices: # all - Build both, determine which to use at runtime -# wayland - Use wayland backend -# x11 - Use X11 backend +# wayland - Only provide Wayland support +# x11 - Only provide X11 support WINDOWS=all # Configure available backends: |