summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyevents.c7
-rw-r--r--src/options.c1
-rw-r--r--src/options.h2
-rw-r--r--src/winwidget.c4
4 files changed, 12 insertions, 2 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index c44667f..ddfe782 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -127,6 +127,7 @@ void init_keyevents(void) {
feh_set_kb(&keys.toggle_actions, 0, XK_a, 0, 0, 0, 0);
feh_set_kb(&keys.toggle_aliasing, 0, XK_A, 0, 0, 0, 0);
feh_set_kb(&keys.toggle_filenames, 0, XK_d, 0, 0, 0, 0);
+ feh_set_kb(&keys.toggle_info, 0, XK_i, 0, 0, 0, 0);
feh_set_kb(&keys.toggle_pointer, 0, XK_o, 0, 0, 0, 0);
feh_set_kb(&keys.toggle_caption, 0, XK_c, 0, 0, 0, 0);
feh_set_kb(&keys.toggle_pause, 0, XK_h, 0, 0, 0, 0);
@@ -250,6 +251,8 @@ void init_keyevents(void) {
cur_kb = &keys.toggle_aliasing;
else if (!strcmp(action, "toggle_filenames"))
cur_kb = &keys.toggle_filenames;
+ else if (!strcmp(action, "toggle_info"))
+ cur_kb = &keys.toggle_info;
else if (!strcmp(action, "toggle_pointer"))
cur_kb = &keys.toggle_pointer;
else if (!strcmp(action, "toggle_caption"))
@@ -564,6 +567,10 @@ void feh_event_handle_keypress(XEvent * ev)
opt.draw_filename = !opt.draw_filename;
winwidget_rerender_all(0);
}
+ else if (feh_is_kp(&keys.toggle_info, keysym, state)) {
+ opt.draw_info = !opt.draw_info;
+ winwidget_rerender_all(0);
+ }
else if (feh_is_kp(&keys.toggle_pointer, keysym, state)) {
winwidget_set_pointer(winwid, opt.hide_pointer);
opt.hide_pointer = !opt.hide_pointer;
diff --git a/src/options.c b/src/options.c
index f4d4029..b5a95dd 100644
--- a/src/options.c
+++ b/src/options.c
@@ -772,6 +772,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
break;
case 234:
opt.info_cmd = estrdup(optarg);
+ opt.draw_info = 1;
break;
case 235:
opt.force_aliasing = 1;
diff --git a/src/options.h b/src/options.h
index 431fdfc..f0015c9 100644
--- a/src/options.h
+++ b/src/options.h
@@ -68,6 +68,7 @@ struct __fehoptions {
unsigned char screen_clip;
unsigned char hide_pointer;
unsigned char draw_actions;
+ unsigned char draw_info;
unsigned char cache_thumbnails;
unsigned char cycle_once;
unsigned char hold_actions[10];
@@ -175,6 +176,7 @@ struct __fehkb {
struct __fehkey render;
struct __fehkey toggle_actions;
struct __fehkey toggle_filenames;
+ struct __fehkey toggle_info;
struct __fehkey toggle_pointer;
struct __fehkey toggle_aliasing;
struct __fehkey jump_random;
diff --git a/src/winwidget.c b/src/winwidget.c
index 57a8b1d..a678781 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -562,7 +562,7 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
feh_draw_filename(winwid);
if (opt.draw_actions)
feh_draw_actions(winwid);
- if (opt.info_cmd)
+ if (opt.draw_info && opt.info_cmd)
feh_draw_info(winwid);
if (winwid->errstr)
feh_draw_errstr(winwid);
@@ -589,7 +589,7 @@ void winwidget_render_image_cached(winwidget winwid)
feh_draw_filename(winwid);
if (opt.draw_actions)
feh_draw_actions(winwid);
- if (opt.info_cmd)
+ if (opt.draw_info && opt.info_cmd)
feh_draw_info(winwid);
XSetWindowBackgroundPixmap(disp, winwid->win, winwid->bg_pmap);
XClearWindow(disp, winwid->win);