From f74385dec092224d046dddc02b731ee30405710f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 26 Sep 2013 18:36:57 +0200 Subject: add "--info ;cmd" to disable info display on startup (closes #142) --- ChangeLog | 2 ++ man/feh.pre | 9 ++++++++- src/options.c | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e7a5c2..d3f009f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ git HEAD * Allow non-centered wallpapers using the --geometry option (Patch by Joel Bradshaw) + * Add ; flag to --info (as in "--info ';echo foo'") to disable info + display on startup Tue, 11 Jun 2013 08:27:24 +0200 Daniel Friesel diff --git a/man/feh.pre b/man/feh.pre index a5b9b59..ffbf933 100644 --- a/man/feh.pre +++ b/man/feh.pre @@ -357,7 +357,7 @@ window becomes visible. Use .Cm --preload to get a progress bar. . -.It Cm --info Ar commandline +.It Cm --info Oo Ar flag Oc Ns Ar commandline . Execute .Ar commandline @@ -365,6 +365,13 @@ and display its output in the bottom left corner of the image. Can be used to display e.g. image dimensions or EXIF information. Supports .Sx FORMAT SPECIFIERS . . +If +.Ar flag +is set to +.Qo ; Qc , +the output will not be displayed by default, but has to be enabled by the +toggle_info key. +. .It Cm -k , --keep-http . When viewing files using HTTP, diff --git a/src/options.c b/src/options.c index 627c7da..c6166d9 100644 --- a/src/options.c +++ b/src/options.c @@ -717,7 +717,10 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) break; case 234: opt.info_cmd = estrdup(optarg); - opt.draw_info = 1; + if (opt.info_cmd[0] == ';') + opt.info_cmd++; + else + opt.draw_info = 1; break; case 235: opt.force_aliasing = 1; -- cgit v1.2.3