Loading ChangeLog +10 −0 Original line number Diff line number Diff line git HEAD * Add R, * and / aliases for <keypad begin>, <keypad *> and <keypad /> * Try to convert unloadable files with imagemagick for up to 6 seconds * Add --magick-timeout option to set imagemagick conversion timeout or disable it altogether * Clean up temporary / to-delete files when receiveng SIG{INT,TERM,QUIT} * Do not scroll past image borders when using key bindings * --loadable / --unloadable: indicate result in exit status Tue, 06 Mar 2012 13:13:35 +0100 Daniel Friesel <derf@finalrewind.org> * Release v2.4 Loading TODO +39 −41 Original line number Diff line number Diff line Loading @@ -79,19 +79,6 @@ the dependency might be an idea updated: 2011/11/29 13:34:35 -0800 comments: 2 54. proper support for tiling WMs [was: zoom to window size] ------------------------------------------------------------ i frequently use feh with a tiling window manager. it would be great if there were a switch that automatically zoomed the image to the window size (like with fullscreen, but without actually changing the window size). right now i need to specify the exact geometry to get this to work correctly. state: open user: ecraven votes: 0 created: 2011/08/11 03:15:38 -0700 updated: 2011/10/31 02:20:16 -0700 comments: 8 67. receive commands from the terminal that started feh ------------------------------------------------------- I am running feh on a remote machine by starting it from a ssh terminal. I Loading Loading @@ -119,34 +106,6 @@ window size. Gotta fix that. updated: 2011/11/27 18:59:58 -0800 comments: 1 73. Position and Maximum Size of feh window ------------------------------------------- The --geometry lets you specify a fixed size and location for the window BUG: specifying just a location is positioned right but produces a checkerboard display! feh --geometry +50+5 vary_large_image.jpg No image gets displayed Full screen also does not take into account things like a bottom panel. and Window Decorations. I wouldn't expect it to, as it is not always something that can be determined. Instead allowing the user to specify display limits (placement and the size for --scale-down) would seem a better method. Especially when you do not want checkerboard. An option to center the window in that area would also work well but not nessary! state: open user: antofthy votes: 0 created: 2011/11/23 00:07:41 -0800 updated: 2011/11/26 03:52:45 -0800 comments: 0 75. image opened by thumbnail mode is in position 0 of the filelist ------------------------------------------------------------------- 1. Loading Loading @@ -191,3 +150,42 @@ and 3rd mouse buttons. updated: 2012/01/27 00:53:05 -0800 comments: 2 81. zoom, scale-down etc. are a huge mess ----------------------------------------- * when using feh --scale-down, the middle button toggles between zoom 100% and zoom to fit. It should only set zoom to 100% * --scale-down: removing the zoom = 1.001 workaround from keyevents.c, zoom 100% -> zoom in / out breaks * same for events.c, except there's no workaround in place state: open user: derf votes: 0 created: 2012/03/06 04:12:09 -0800 comments: 0 82. feh loads movies with convert --------------------------------- feh loads movies with convert. That takes a very long time, because I only have 5 gigabytes of RAM. (pun intended) That is probably an unintended "feature" introduced by commit ba08d4b25fcbcd4e16388673184cf4d179dbd420. For my needs it would be best if I could disable the call to convert by default (maybe a new config file?), while providing a command line argument reenabling the convert feature. (for the rare occasions when I use really obscure file formats) state: open user: pyropeter votes: 0 created: 2012/03/07 13:25:32 -0800 updated: 2012/03/10 06:49:16 -0800 comments: 3 83. add keybindings for brightness / contrast adjustment -------------------------------------------------------- Requested by mail: for example, b/B for brightness and k/K for contrast. state: open user: derf votes: 0 created: 2012/03/10 05:40:36 -0800 comments: 0 man/feh.pre +5 −3 Original line number Diff line number Diff line Loading @@ -383,6 +383,7 @@ size/resolution/type etc. . Don't display images. Just print out their names if imlib2 can successfully load them. Returns false if at least one image failed to load. . .It Cm -M , --menu-font Ar font . Loading Loading @@ -550,6 +551,7 @@ mode. See . Don't display images. Just print out their names if imlib2 can NOT successfully load them. Returns false if at least one image was loadable. . .It Cm -V , --verbose . Loading Loading @@ -1151,7 +1153,7 @@ Scroll up by one page . Scroll down by one page . .It Ao keypad begin Ac Bq render .It R, Ao keypad begin Ac Bq render . Antialias the image . Loading @@ -1163,11 +1165,11 @@ Zoom in . Zoom out . .It Ao keypad * Ac Bq zoom_default .It *, Ao keypad * Ac Bq zoom_default . Zoom to 100% . .It Ao keypad / Ac Bq zoom_fit .It /, Ao keypad / Ac Bq zoom_fit . Zoom to fit the window size . Loading src/feh.h +3 −0 Original line number Diff line number Diff line Loading @@ -188,4 +188,7 @@ extern feh_menu *menu_main; extern feh_menu *menu_close; extern char *mode; /* label for the current mode */ /* to terminate long-running children with SIGALRM */ extern int childpid; #endif src/imlib.c +36 −6 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ int xinerama_screen; int num_xinerama_screens; #endif /* HAVE_LIBXINERAMA */ int childpid = 0; static char *feh_http_load_image(char *url); static char *feh_magick_load_image(char *filename); Loading Loading @@ -253,7 +255,10 @@ static char *feh_magick_load_image(char *filename) char *tmpname; char *sfn; int fd = -1, devnull = -1; int pid, status; int status; if (opt.magick_timeout < 0) return NULL; basename = strrchr(filename, '/'); Loading @@ -277,27 +282,52 @@ static char *feh_magick_load_image(char *filename) snprintf(argv_fd, sizeof(argv_fd), "png:fd:%d", fd); if ((pid = fork()) == 0) { if ((childpid = fork()) == 0) { /* discard convert output */ devnull = open("/dev/null", O_WRONLY); dup2(devnull, 0); dup2(devnull, 1); dup2(devnull, 2); /* * convert only accepts SIGINT via killpg, a normal kill doesn't work */ setpgid(0, 0); execlp("convert", "convert", filename, argv_fd, NULL); exit(1); } else { waitpid(pid, &status, 0); alarm(opt.magick_timeout); waitpid(childpid, &status, 0); alarm(0); if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) { close(fd); unlink(sfn); sfn = NULL; if (!opt.quiet) weprintf("%s - No loader for that file format", filename); if (!opt.quiet) { if (WIFSIGNALED(status)) weprintf("%s - Conversion took too long, skipping", filename); else weprintf("%s - No loader for that file format", filename); } /* * Reap child. The previous waitpid call was interrupted by * alarm, but convert doesn't terminate immediately. * XXX * normally, if (WIFSIGNALED(status)) waitpid(childpid, &status, 0); * would suffice. However, as soon as feh has its own window, * this doesn't work anymore and the following workaround is * required. Hm. */ waitpid(-1, &status, 0); } childpid = 0; } return sfn; Loading Loading
ChangeLog +10 −0 Original line number Diff line number Diff line git HEAD * Add R, * and / aliases for <keypad begin>, <keypad *> and <keypad /> * Try to convert unloadable files with imagemagick for up to 6 seconds * Add --magick-timeout option to set imagemagick conversion timeout or disable it altogether * Clean up temporary / to-delete files when receiveng SIG{INT,TERM,QUIT} * Do not scroll past image borders when using key bindings * --loadable / --unloadable: indicate result in exit status Tue, 06 Mar 2012 13:13:35 +0100 Daniel Friesel <derf@finalrewind.org> * Release v2.4 Loading
TODO +39 −41 Original line number Diff line number Diff line Loading @@ -79,19 +79,6 @@ the dependency might be an idea updated: 2011/11/29 13:34:35 -0800 comments: 2 54. proper support for tiling WMs [was: zoom to window size] ------------------------------------------------------------ i frequently use feh with a tiling window manager. it would be great if there were a switch that automatically zoomed the image to the window size (like with fullscreen, but without actually changing the window size). right now i need to specify the exact geometry to get this to work correctly. state: open user: ecraven votes: 0 created: 2011/08/11 03:15:38 -0700 updated: 2011/10/31 02:20:16 -0700 comments: 8 67. receive commands from the terminal that started feh ------------------------------------------------------- I am running feh on a remote machine by starting it from a ssh terminal. I Loading Loading @@ -119,34 +106,6 @@ window size. Gotta fix that. updated: 2011/11/27 18:59:58 -0800 comments: 1 73. Position and Maximum Size of feh window ------------------------------------------- The --geometry lets you specify a fixed size and location for the window BUG: specifying just a location is positioned right but produces a checkerboard display! feh --geometry +50+5 vary_large_image.jpg No image gets displayed Full screen also does not take into account things like a bottom panel. and Window Decorations. I wouldn't expect it to, as it is not always something that can be determined. Instead allowing the user to specify display limits (placement and the size for --scale-down) would seem a better method. Especially when you do not want checkerboard. An option to center the window in that area would also work well but not nessary! state: open user: antofthy votes: 0 created: 2011/11/23 00:07:41 -0800 updated: 2011/11/26 03:52:45 -0800 comments: 0 75. image opened by thumbnail mode is in position 0 of the filelist ------------------------------------------------------------------- 1. Loading Loading @@ -191,3 +150,42 @@ and 3rd mouse buttons. updated: 2012/01/27 00:53:05 -0800 comments: 2 81. zoom, scale-down etc. are a huge mess ----------------------------------------- * when using feh --scale-down, the middle button toggles between zoom 100% and zoom to fit. It should only set zoom to 100% * --scale-down: removing the zoom = 1.001 workaround from keyevents.c, zoom 100% -> zoom in / out breaks * same for events.c, except there's no workaround in place state: open user: derf votes: 0 created: 2012/03/06 04:12:09 -0800 comments: 0 82. feh loads movies with convert --------------------------------- feh loads movies with convert. That takes a very long time, because I only have 5 gigabytes of RAM. (pun intended) That is probably an unintended "feature" introduced by commit ba08d4b25fcbcd4e16388673184cf4d179dbd420. For my needs it would be best if I could disable the call to convert by default (maybe a new config file?), while providing a command line argument reenabling the convert feature. (for the rare occasions when I use really obscure file formats) state: open user: pyropeter votes: 0 created: 2012/03/07 13:25:32 -0800 updated: 2012/03/10 06:49:16 -0800 comments: 3 83. add keybindings for brightness / contrast adjustment -------------------------------------------------------- Requested by mail: for example, b/B for brightness and k/K for contrast. state: open user: derf votes: 0 created: 2012/03/10 05:40:36 -0800 comments: 0
man/feh.pre +5 −3 Original line number Diff line number Diff line Loading @@ -383,6 +383,7 @@ size/resolution/type etc. . Don't display images. Just print out their names if imlib2 can successfully load them. Returns false if at least one image failed to load. . .It Cm -M , --menu-font Ar font . Loading Loading @@ -550,6 +551,7 @@ mode. See . Don't display images. Just print out their names if imlib2 can NOT successfully load them. Returns false if at least one image was loadable. . .It Cm -V , --verbose . Loading Loading @@ -1151,7 +1153,7 @@ Scroll up by one page . Scroll down by one page . .It Ao keypad begin Ac Bq render .It R, Ao keypad begin Ac Bq render . Antialias the image . Loading @@ -1163,11 +1165,11 @@ Zoom in . Zoom out . .It Ao keypad * Ac Bq zoom_default .It *, Ao keypad * Ac Bq zoom_default . Zoom to 100% . .It Ao keypad / Ac Bq zoom_fit .It /, Ao keypad / Ac Bq zoom_fit . Zoom to fit the window size . Loading
src/feh.h +3 −0 Original line number Diff line number Diff line Loading @@ -188,4 +188,7 @@ extern feh_menu *menu_main; extern feh_menu *menu_close; extern char *mode; /* label for the current mode */ /* to terminate long-running children with SIGALRM */ extern int childpid; #endif
src/imlib.c +36 −6 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ int xinerama_screen; int num_xinerama_screens; #endif /* HAVE_LIBXINERAMA */ int childpid = 0; static char *feh_http_load_image(char *url); static char *feh_magick_load_image(char *filename); Loading Loading @@ -253,7 +255,10 @@ static char *feh_magick_load_image(char *filename) char *tmpname; char *sfn; int fd = -1, devnull = -1; int pid, status; int status; if (opt.magick_timeout < 0) return NULL; basename = strrchr(filename, '/'); Loading @@ -277,27 +282,52 @@ static char *feh_magick_load_image(char *filename) snprintf(argv_fd, sizeof(argv_fd), "png:fd:%d", fd); if ((pid = fork()) == 0) { if ((childpid = fork()) == 0) { /* discard convert output */ devnull = open("/dev/null", O_WRONLY); dup2(devnull, 0); dup2(devnull, 1); dup2(devnull, 2); /* * convert only accepts SIGINT via killpg, a normal kill doesn't work */ setpgid(0, 0); execlp("convert", "convert", filename, argv_fd, NULL); exit(1); } else { waitpid(pid, &status, 0); alarm(opt.magick_timeout); waitpid(childpid, &status, 0); alarm(0); if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) { close(fd); unlink(sfn); sfn = NULL; if (!opt.quiet) weprintf("%s - No loader for that file format", filename); if (!opt.quiet) { if (WIFSIGNALED(status)) weprintf("%s - Conversion took too long, skipping", filename); else weprintf("%s - No loader for that file format", filename); } /* * Reap child. The previous waitpid call was interrupted by * alarm, but convert doesn't terminate immediately. * XXX * normally, if (WIFSIGNALED(status)) waitpid(childpid, &status, 0); * would suffice. However, as soon as feh has its own window, * this doesn't work anymore and the following workaround is * required. Hm. */ waitpid(-1, &status, 0); } childpid = 0; } return sfn; Loading