├── .github └── workflows │ └── c.yml ├── .gitignore ├── .mailmap ├── AUTHORS ├── COPYING ├── ChangeLog ├── Makefile ├── README.md ├── TODO ├── config.mk ├── examples ├── buttons ├── find-lowres ├── keys └── themes ├── man ├── Makefile └── feh.pre ├── scripts ├── checkkeys.pl ├── checkopts.pl ├── lskeys.pl ├── lsopts.pl └── update-todo.sh ├── share ├── applications │ ├── Makefile │ └── feh.pre ├── fonts │ ├── black.style │ ├── menu.style │ └── yudit.ttf └── images │ ├── feh.png │ ├── feh.svg │ └── menubg_default.png ├── src ├── Makefile ├── debug.h ├── events.c ├── events.h ├── exif.c ├── exif.h ├── exif_canon.c ├── exif_canon.h ├── exif_cfg.h ├── exif_nikon.c ├── exif_nikon.h ├── feh.h ├── feh_png.c ├── feh_png.h ├── filelist.c ├── filelist.h ├── gib_hash.c ├── gib_hash.h ├── gib_imlib.c ├── gib_imlib.h ├── gib_list.c ├── gib_list.h ├── gib_style.c ├── gib_style.h ├── help.raw ├── imlib.c ├── index.c ├── index.h ├── keyevents.c ├── list.c ├── main.c ├── md5.c ├── md5.h ├── menu.c ├── menu.h ├── multiwindow.c ├── options.c ├── options.h ├── signals.c ├── signals.h ├── slideshow.c ├── structs.h ├── strverscmp.c ├── thumbnail.c ├── thumbnail.h ├── timers.c ├── timers.h ├── utils.c ├── utils.h ├── wallpaper.c ├── wallpaper.h ├── winwidget.c └── winwidget.h └── test ├── bg ├── exact │ ├── h │ │ ├── center │ │ ├── fill │ │ ├── in │ │ ├── max │ │ ├── scale │ │ └── tile │ ├── in │ ├── out │ └── w │ │ ├── center │ │ ├── fill │ │ ├── in │ │ ├── max │ │ ├── scale │ │ └── tile ├── large │ ├── h │ │ ├── center │ │ ├── fill │ │ ├── in │ │ ├── max │ │ ├── scale │ │ └── tile │ └── w │ │ ├── center │ │ ├── fill │ │ ├── in │ │ ├── max │ │ ├── scale │ │ └── tile ├── small │ ├── h │ │ ├── center │ │ ├── fill │ │ ├── in │ │ ├── max │ │ ├── scale │ │ └── tile │ └── w │ │ ├── center │ │ ├── fill │ │ ├── in │ │ ├── max │ │ ├── scale │ │ └── tile └── transparency ├── config ├── keys │ └── feh │ │ └── keys └── themes │ └── feh │ └── themes ├── fail ├── gif ├── jpg ├── png └── pnm ├── feh-bg-i.t ├── feh-i.t ├── feh-scr-i.t ├── feh.t ├── huge.png ├── imlib2-bug-notice ├── list ├── custom ├── default ├── filename ├── filename_recursive ├── format ├── format_reverse ├── height ├── name ├── pixels ├── size └── width ├── list_imlib2_1.6 ├── custom ├── default ├── filename ├── filename_recursive ├── format ├── format_reverse ├── height ├── name ├── pixels ├── size └── width ├── mandoc.t ├── no-loadable-files ├── no-loadable-files.help ├── nx_action ├── loadable_action ├── loadable_naction ├── unloadable_action └── unloadable_naction ├── ok ├── gif ├── jpg ├── jpg_exif ├── png ├── pnm └── recursive │ └── png ├── run-interactive ├── scr ├── caption_done ├── caption_new ├── caption_none ├── caption_while ├── draw_action ├── draw_action_tinted ├── draw_all_multi ├── draw_all_one ├── draw_filename ├── draw_filename_action ├── draw_filename_action_tinted ├── draw_filename_tinted ├── draw_info ├── draw_info_tinted ├── draw_nothing ├── feh_full_lwi ├── feh_ibg_black ├── feh_ibg_default ├── feh_ibg_white ├── feh_lhi ├── feh_lhi_i ├── feh_lhi_ii ├── feh_lhi_iir ├── feh_lhi_iirr ├── feh_lhi_iirri ├── feh_lhi_iirrio ├── feh_lhi_o ├── feh_lhi_oo ├── feh_lhi_ooo ├── feh_lwi ├── feh_lwi_scroll_r ├── feh_lwi_scroll_rd ├── feh_lwi_scroll_rdr ├── feh_lwi_scroll_rdru ├── feh_lwi_scroll_rdrul ├── feh_scaledown_lwi ├── geometry_offset_only ├── index_full_h400 ├── index_full_w400 ├── index_h400 ├── index_w400 └── thumbnail_default ├── status ├── tiny.pbm └── warning-no-loader /.github/workflows/c.yml: -------------------------------------------------------------------------------- 1 | name: linux 2 | 3 | on: 4 | push: 5 | branches: 6 | - '*' 7 | pull_request: 8 | branches: 9 | - '*' 10 | 11 | jobs: 12 | c: 13 | 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | curl: [0, 1] 19 | exif: [0, 1] 20 | xinerama: [0, 1] 21 | 22 | steps: 23 | - uses: actions/checkout@v2 24 | - name: APT 25 | run: sudo apt-get -y update 26 | - name: Install Dependencies 27 | run: sudo apt-get -y install build-essential libx11-dev libxt-dev libimlib2-dev libtest-command-perl libtest-simple-perl 28 | - name: Install libcurl 29 | if: matrix.curl 30 | run: sudo apt-get -y install libcurl4-openssl-dev 31 | - name: Install libexif 32 | if: matrix.exif 33 | run: sudo apt-get -y install libexif-dev 34 | - name: Install Xinerama 35 | if: matrix.xinerama 36 | run: sudo apt-get -y install libxinerama-dev 37 | - name: Build and Test 38 | run: for inotify in 0 1; do for verscmp in 0 1; do make curl=${{ matrix.curl }} exif=${{ matrix.exif }} inotify=$inotify verscmp=$verscmp xinerama=${{ matrix.xinerama }} && make test && make clean; done; done 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /share/applications/*.desktop 2 | /src/deps.mk 3 | /src/*.o 4 | /src/*.inc 5 | /src/feh 6 | /man/*.1 7 | *~ 8 | core 9 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Birte Kristina Friesel 2 | Birte Kristina Friesel 3 | Birte Kristina Friesel 4 | Birte Kristina Friesel 5 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Principle author. 2 | Tom Gilbert (gilbrit, giblet, grubby) 3 | 4 | Paul Duncan (pabs) - pabs (at) pablotron (dot) org 5 | - cam, wget fixups, mouse-button swapping options, rotation, 6 | xinerama support, menu backgrounds, and more. 7 | 8 | Richard Lowe (richlowe) - richlowe (at) btinternet (dot) com 9 | - background setting code, thumbnail patches. 10 | 11 | Benjamin Elijah Griffin bgriffin (at) cddb (dot) com 12 | - made builtin http work. 13 | 14 | Mrinal Kalakrishnan - mrinal (at) india (dot) com 15 | - auto-zoom mode. 16 | 17 | Phil Morris (marmot) - marmot (at) vennercs (dot) com 18 | - about.png. 19 | 20 | Carlos Puchol - cpg (at) puchol (dot) com 21 | - configure.in fix for nonstandard imlib2 locations. 22 | 23 | Eric Dorland - dorland (at) lords (dot) com 24 | - the --title option. 25 | 26 | Omar Harriott - omar.harriott (at) csun (dot) edu 27 | - fix filelist handling for filenames with spaces. 28 | 29 | Panagiotis Issaris - takis.issaris (at) skynet (dot) be 30 | - keypad buttonpresses 31 | 32 | Jon Bernard - jbernard (at) roanoke (dot) edu 33 | - xinerama bugfix 34 | 35 | Maciej Kalisiak - mac (at) dgp (dot) toronto (dot) edu 36 | - large image/zoom bugfix 37 | 38 | Claes Nasten - pekdon (at) pekdon (dot) net 39 | - Thumbnail caching, fixes 40 | 41 | JC - jcm314 (at) yahoo (dot) com 42 | - multiple --action* options 43 | 44 | Ulrich Spoerlein - q (at) uni (dot) de 45 | - fullscreen image count display 46 | 47 | Yu-Jie Lin 48 | - Various patches 49 | 50 | Dennis Real 51 | - patch for builtin exif support (exif=1) 52 | 53 | Birte Kristina Friesel - derf (at) finalrewind (dot) org 54 | - Maintenance since 2010 55 | 56 | Thanks to: 57 | Michael Jennings - mej (at) eterm (dot) org 58 | - Makefile Fixes, moral support 59 | 60 | Alistair Sutton - metallica (at) freenet (dot) co (dot) uk 61 | - rpm spec file for redhat. 62 | 63 | Laurence J. Lane - ljlane (at) debian (dot) org 64 | - debian assimilation. 65 | 66 | The Rasterman - raster (at) rasterman (dot) com 67 | - Imlib2, initial zooming code example. Enlightenment. 68 | 69 | Stephen Levine 70 | - Great help debugging under E17 71 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 1999,2000 Tom Gilbert. 2 | Copyright (C) 2010-2024 Birte Kristina Friesel. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to 6 | deal in the Software without restriction, including without limitation the 7 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8 | sell copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies of the Software and its documentation and acknowledgment shall be 13 | given in the documentation and software packages that this Software was 14 | used. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include config.mk 2 | 3 | all: build-src build-man build-applications 4 | 5 | build-src: 6 | @${MAKE} -C src 7 | 8 | build-man: 9 | @${MAKE} -C man 10 | 11 | build-applications: 12 | @${MAKE} -C share/applications 13 | 14 | test: all 15 | @if ! uname -m | grep -q -e arm -e mips; then \ 16 | PACKAGE=${PACKAGE} prove test/feh.t test/mandoc.t; \ 17 | else \ 18 | PACKAGE=${PACKAGE} prove test/feh.t test/mandoc.t || cat test/imlib2-bug-notice; \ 19 | fi 20 | 21 | test-x11: all 22 | test/run-interactive 23 | prove test/feh-bg-i.t 24 | 25 | install: install-man install-doc install-bin install-font install-img 26 | install: install-icon install-examples install-applications 27 | 28 | install-man: man/feh.1 29 | @echo installing manuals to ${man_dir} 30 | @mkdir -p ${man_dir}/man1 31 | @cp man/feh.1 ${man_dir}/man1 32 | @chmod 644 ${man_dir}/man1/feh.1 33 | 34 | install-doc: AUTHORS ChangeLog README.md TODO 35 | @echo installing docs to ${doc_dir} 36 | @mkdir -p ${doc_dir} 37 | @cp AUTHORS ChangeLog README.md TODO ${doc_dir} 38 | @chmod 644 ${doc_dir}/AUTHORS ${doc_dir}/ChangeLog ${doc_dir}/README.md \ 39 | ${doc_dir}/TODO 40 | 41 | install-bin: src/feh 42 | @echo installing executables to ${bin_dir} 43 | @mkdir -p ${bin_dir} 44 | @cp src/feh ${bin_dir}/feh.tmp 45 | @mv ${bin_dir}/feh.tmp ${bin_dir}/feh 46 | @chmod 755 ${bin_dir}/feh 47 | 48 | install-font: 49 | @echo installing fonts to ${font_dir} 50 | @mkdir -p ${font_dir} 51 | @chmod 755 ${font_dir} 52 | @cp share/fonts/* ${font_dir} 53 | @chmod 644 ${font_dir}/* 54 | 55 | install-img: 56 | @echo installing images to ${image_dir} 57 | @mkdir -p ${image_dir} 58 | @chmod 755 ${image_dir} 59 | @cp share/images/* ${image_dir} 60 | @chmod 644 ${image_dir}/* 61 | 62 | install-icon: 63 | @echo installing icon to ${48_icon_dir} 64 | @mkdir -p ${48_icon_dir} 65 | @cp share/images/feh.png ${48_icon_dir} 66 | @chmod 644 ${48_icon_dir}/feh.png 67 | @echo installing icon to ${scalable_icon_dir} 68 | @mkdir -p ${scalable_icon_dir} 69 | @cp share/images/feh.svg ${scalable_icon_dir} 70 | @chmod 644 ${scalable_icon_dir}/feh.svg 71 | @if test "${app}" = 1 && which gtk-update-icon-cache > /dev/null 2>&1; then \ 72 | gtk-update-icon-cache ${icon_dir}; \ 73 | fi 74 | 75 | install-examples: 76 | @echo installing examples to ${example_dir} 77 | @mkdir -p ${example_dir} 78 | @cp examples/* ${example_dir} 79 | @chmod 644 ${example_dir}/* 80 | 81 | install-applications: share/applications/feh.desktop 82 | @echo installing desktop file to ${desktop_dir} 83 | @mkdir -p ${desktop_dir} 84 | @cp share/applications/feh.desktop ${desktop_dir} 85 | @chmod 644 ${desktop_dir}/feh.desktop 86 | 87 | 88 | uninstall: 89 | rm -f ${man_dir}/man1/feh.1 90 | rm -rf ${doc_dir} 91 | rm -f ${bin_dir}/feh 92 | rm -f ${desktop_dir}/feh.desktop 93 | rm -rf ${font_dir} 94 | rm -rf ${image_dir} 95 | @if test -e ${48_icon_dir}/feh.png; then \ 96 | echo rm -f ${48_icon_dir}/feh.png; \ 97 | rm -f ${48_icon_dir}/feh.png; \ 98 | fi 99 | @if test -e ${scalable_icon_dir}/feh.svg; then \ 100 | echo rm -f ${scalable_icon_dir}/feh.svg; \ 101 | rm -f ${scalable_icon_dir}/feh.svg; \ 102 | fi 103 | @if which gtk-update-icon-cache > /dev/null 2>&1; then \ 104 | gtk-update-icon-cache ${icon_dir}; \ 105 | fi 106 | 107 | dist: 108 | mkdir /tmp/feh-${VERSION} 109 | git --work-tree=/tmp/feh-${VERSION} checkout -f 110 | cp src/deps.mk /tmp/feh-${VERSION}/src/deps.mk 111 | sed -i 's/^VERSION ?= .*$$/VERSION ?= ${VERSION}/' \ 112 | /tmp/feh-${VERSION}/config.mk 113 | sed -i 's/^MAN_DATE ?= .*$$/MAN_DATE ?= ${MAN_DATE}/' \ 114 | /tmp/feh-${VERSION}/config.mk 115 | tar -C /tmp -cjf ../feh-${VERSION}.tar.bz2 feh-${VERSION} 116 | rm -r /tmp/feh-${VERSION} 117 | 118 | disttest: dist 119 | tar -C /tmp -xjf ../feh-${VERSION}.tar.bz2 120 | make -C /tmp/feh-${VERSION} 121 | make -C /tmp/feh-${VERSION} test 122 | make -C /tmp/feh-${VERSION} install DESTDIR=./install 123 | make -C /tmp/feh-${VERSION} uninstall DESTDIR=./install 124 | rm -r /tmp/feh-${VERSION} 125 | 126 | clean: 127 | @${MAKE} -C src clean 128 | @${MAKE} -C man clean 129 | @${MAKE} -C share/applications clean 130 | 131 | .PHONY: all test test-x11 install uninstall clean install-man install-doc \ 132 | install-bin install-font install-img install-examples \ 133 | install-applications dist 134 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # feh - Image Viewer and Cataloguer 2 | 3 | **feh** is a light-weight, configurable and versatile image viewer. 4 | It is aimed at command line users, but can also be started from graphical file 5 | managers. Apart from viewing images, it can compile text and thumbnail 6 | listings, show (un)loadable files, set X11 backgrounds, and more. 7 | 8 | Features include filelists, various image sorting modes, custom action scripts, 9 | and image captions. feh can be controlled by configurable keyboard and mouse 10 | shortcuts, terminal input and signals. When no file arguments or filelists are 11 | specified, feh displays all files in the current directory. 12 | 13 | This README focuses on installation and contribution instructions. See the 14 | [feh homepage](https://feh.finalrewind.org/) and the 15 | [feh(1) manual](https://man.finalrewind.org/1/feh/) for usage instructions. 16 | 17 | ## Dependencies 18 | 19 | * Imlib2 20 | * libcurl (disable with `curl=0`) 21 | * libpng 22 | * libX11 23 | * libXt 24 | * libXinerama (disable with `xinerama=0`) 25 | 26 | Only when building with `exif=1`: 27 | 28 | * libexif-dev 29 | * libexif12 30 | 31 | Only when building with `magic=1`: 32 | 33 | * libmagic 34 | 35 | ## Build Process 36 | 37 | feh has been packaged for a variety of distributions, including 38 | [Arch Linux](https://archlinux.org/packages/extra/x86_64/feh/), 39 | [Debian](https://packages.debian.org/search?keywords=feh&exact=1), 40 | [FreeBSD](https://www.freshports.org/graphics/feh), and 41 | [Ubuntu](https://packages.ubuntu.com/search?keywords=feh&exact=1). 42 | You can configure, compile and install a custom version as follows. 43 | 44 | ### Configuration 45 | 46 | feh's build process uses make flags to enable/disable optional features and 47 | fine-tune the build and installation process. It uses (hopefully) reasonable 48 | defaults, so you can skip this section if you like. 49 | 50 | Make flags can be passed as **make** arguments or set as environment variables, 51 | like so: 52 | 53 | ```bash 54 | $ make flag=bool 55 | $ make install flag=bool 56 | ``` 57 | or 58 | ```bash 59 | $ export flag=bool 60 | $ make && make install 61 | ``` 62 | 63 | The following flags are respected by the makefile. A default value of **1** 64 | indicates that the corresponding feature is enabled by default. 65 | 66 | | Flag | Default value | Description | 67 | | :--- | :---: | :--- | 68 | | app | 0 | install icons to /usr/share, regardless of `DESTDIR` and `PREFIX`, and call gtk-update-icon-cache afterwards | 69 | | curl | 1 | use libcurl to view https:// and similar images | 70 | | debug | 0 | debug build, enables `--debug` | 71 | | exif | 0 | Builtin EXIF tag display support | 72 | | help | 0 | include help text (refers to the manpage otherwise) | 73 | | inotify | 0 | enable inotify, needed for `--auto-reload` | 74 | | stat64 | 0 | Support CIFS shares from 64bit hosts on 32bit machines | 75 | | magic | 0 | Use libmagic to filter unsupported file formats | 76 | | mkstemps | 1 | Whether your libc provides `mkstemps()`. If set to 0, feh will be unable to load gif images via libcurl | 77 | | verscmp | 1 | Whether your libc provides `strvercmp()`. If set to 0, feh will use an internal implementation. | 78 | | xinerama | 1 | Support Xinerama/XRandR multiscreen setups | 79 | 80 | For example, `make xinerama=0 debug=1` will disable Xinerama support and 81 | produce a debug build; libcurl and natural sorting support will remain enabled. 82 | 83 | Additionally, it supports the standard variables `CFLAGS`, `LDLIBS`, `PREFIX`, 84 | and `DESTDIR`. 85 | 86 | **PREFIX _(default: /usr/local)_** controls where the application and its data files 87 | will be installed. It must be set both during `make` and `make install`. 88 | 89 | **DESTDIR _(default: empty)_** sets the installation root during "make install". It 90 | is mostly useful for package maintainers. 91 | 92 | **Note:** Defaults are specified in `config.mk`. It is designed so that in most 93 | cases, you can set environment variables instead of editing it. E.g.: 94 | 95 | ```bash 96 | $ CFLAGS='-g -Os' make 97 | ``` 98 | ```bash 99 | $ export DESTDIR=/tmp/feh PREFIX=/usr 100 | $ make && make install 101 | ``` 102 | 103 | Builtin EXIF support is maintained by Dennis Real, [here](https://github.com/reald/feh). 104 | 105 | ### Installation 106 | 107 | Add your own make flags to the following examples as needed. 108 | 109 | **For end users:** 110 | ```bash 111 | $ make 112 | $ sudo make install app=1 113 | ``` 114 | 115 | **For package maintainers and users who do not want feh to install its 116 | icons into /usr/share:** 117 | ```bash 118 | $ make 119 | $ sudo make install 120 | ``` 121 | 122 | **Explanation:** feh ships some icons and an X11 desktop entry, which allow it to 123 | be used from file managers, desktop menus and similar. However, installing 124 | icons to /usr/local/share/... does not seem to work reliably. 125 | Because of this, when using "make install app=1", feh will install its icons 126 | to /usr/share/..., even though they technically belong into /usr/local. 127 | 128 | [ZSH completion for 129 | feh](https://git.finalrewind.org/zsh/plain/etc/completions/_feh) is also 130 | available. 131 | 132 | ## Testing (non-X11) 133 | 134 | The non-X11 parts of feh can be automatically tested by running 135 | 136 | ```bash 137 | $ make test 138 | ``` 139 | This requires **perl >= 5.10** and the perl module `Test::Command`. Tests are 140 | non-interactive and do not require a running X11, so they can safely be run on 141 | a headless buildserver. 142 | 143 | ## Contributing 144 | 145 | Bugfixes are always welcome, just open a pull request :) 146 | 147 | Before proposing a new feature, please consider the scope of feh: It is an 148 | image viewer and cataloguer, not an image editor or similar. Also, its option 149 | list is already pretty long. Please discuss your ideas in a feature request 150 | before opening a pull request in this case. Also, keep in mind that feh is 151 | developed as a hobby project and that there is absolutely no obligation for 152 | anyone to implement requested features or review merge requests. 153 | 154 | Please keep in mind that feh's options, key bindings and format specifiers are 155 | documented in two different places: The manual (man/feh.pre) and the help text 156 | (src/help.raw). Although the help is not compiled in by default, it should be 157 | kept up-to-date. On space-constrained embedded systems, it may be more useful 158 | than the (significantly larger) man page. 159 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | See 2 | -------------------------------------------------------------------------------- /config.mk: -------------------------------------------------------------------------------- 1 | PACKAGE ?= feh 2 | VERSION ?= ${shell git describe --dirty} 3 | 4 | app ?= 0 5 | curl ?= 1 6 | debug ?= 0 7 | exif ?= 0 8 | help ?= 0 9 | magic ?= 0 10 | mkstemps ?= 1 11 | verscmp ?= 1 12 | xinerama ?= 1 13 | 14 | # Prefix for all installed files 15 | PREFIX ?= /usr/local 16 | ICON_PREFIX ?= ${DESTDIR}${PREFIX}/share/icons 17 | 18 | # icons in /usr/share/local/icons (and other prefixes != /usr) are not 19 | # generally supported. So ignore PREFIX and always install icons into 20 | # /usr/share/icons if the user wants to install feh on their local machine. 21 | ifeq (${app},1) 22 | ICON_PREFIX = /usr/share/icons 23 | endif 24 | 25 | # Directories for manuals, executables, docs, data, etc. 26 | main_dir = ${DESTDIR}${PREFIX} 27 | man_dir = ${main_dir}/share/man 28 | bin_dir = ${main_dir}/bin 29 | doc_dir = ${main_dir}/share/doc/feh 30 | image_dir = ${main_dir}/share/feh/images 31 | font_dir = ${main_dir}/share/feh/fonts 32 | example_dir = ${main_dir}/share/doc/feh/examples 33 | desktop_dir = ${main_dir}/share/applications 34 | icon_dir = ${ICON_PREFIX}/hicolor 35 | 48_icon_dir = ${icon_dir}/48x48/apps 36 | scalable_icon_dir = ${icon_dir}/scalable/apps 37 | 38 | # default CFLAGS 39 | CFLAGS ?= -g -O2 40 | CFLAGS += -Wall -Wextra -pedantic 41 | 42 | # Settings for glibc >= 2.19 - may need to be adjusted for other systems 43 | CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE 44 | 45 | ifeq (${curl},1) 46 | CFLAGS += -DHAVE_LIBCURL 47 | LDLIBS += -lcurl 48 | MAN_CURL = enabled 49 | else 50 | MAN_CURL = disabled 51 | endif 52 | 53 | ifeq (${debug},1) 54 | CFLAGS += -DDEBUG -O0 55 | MAN_DEBUG = This is a debug build. 56 | else 57 | MAN_DEBUG = . 58 | endif 59 | 60 | ifeq (${help},1) 61 | CFLAGS += -DINCLUDE_HELP 62 | endif 63 | 64 | ifeq (${stat64},1) 65 | CFLAGS += -D_FILE_OFFSET_BITS=64 66 | endif 67 | 68 | ifeq (${mkstemps},1) 69 | CFLAGS += -DHAVE_MKSTEMPS 70 | endif 71 | 72 | ifeq (${magic},1) 73 | CFLAGS += -DHAVE_LIBMAGIC 74 | LDLIBS += -lmagic 75 | MAN_MAGIC = enabled 76 | else 77 | MAN_MAGIC = disabled 78 | endif 79 | 80 | ifeq (${verscmp},1) 81 | CFLAGS += -DHAVE_STRVERSCMP 82 | endif 83 | 84 | ifeq (${xinerama},1) 85 | CFLAGS += -DHAVE_LIBXINERAMA 86 | LDLIBS += -lXinerama 87 | MAN_XINERAMA = enabled 88 | else 89 | MAN_XINERAMA = disabled 90 | endif 91 | 92 | ifeq (${exif},1) 93 | CFLAGS += -DHAVE_LIBEXIF 94 | LDLIBS += -lexif 95 | MAN_EXIF = available 96 | else 97 | MAN_EXIF = not available 98 | endif 99 | 100 | ifeq (${inotify},1) 101 | CFLAGS += -DHAVE_INOTIFY 102 | MAN_INOTIFY = enabled 103 | else 104 | MAN_INOTIFY = disabled 105 | endif 106 | 107 | MAN_DATE ?= ${shell date '+%B %d, %Y'} 108 | 109 | # Uncomment this to use dmalloc 110 | #CFLAGS += -DWITH_DMALLOC 111 | 112 | CFLAGS += -DPREFIX=\"${PREFIX}\" \ 113 | -DPACKAGE=\"${PACKAGE}\" -DVERSION=\"${VERSION}\" 114 | 115 | LDLIBS += -lm -lpng -lX11 -lImlib2 116 | -------------------------------------------------------------------------------- /examples/buttons: -------------------------------------------------------------------------------- 1 | # feh button configuration. 2 | # Comments start with a # sign, do not use them mid-line. 3 | # Each line must be blank, a comment, or a button definition. 4 | # 5 | # button definition: