lel

farbfeld image viewer
git clone git://git.2f30.org/lel
Log | Files | Refs | README | LICENSE

commit f5218c3944254bcfcb184de6ffff153fc4e61956
parent be0f93f92b7b36856acb9709b9ee550b89899db6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat,  2 Aug 2014 00:20:40 +0000

print name to stdout on enter

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
MTODO | 2+-
Mlel.c | 9+++++++++
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/TODO b/TODO @@ -2,7 +2,7 @@ [ ] alpha mask with png2if | lel is always black? [ ] resizing slow (might be a dwm issue). [ ] use XSHM again? -[ ] enter key or some other key should print the current filename to stdout. +[x] enter key or some other key should print the current filename to stdout. [ ] for pictures which use an alpha mask use a checked pattern, similar to: http://www.modejong.com/blog/Media/Ghost_TransparentBG_400x300.jpg [ ] improve lel-open to support multiple files. diff --git a/lel.c b/lel.c @@ -381,6 +381,12 @@ buttonpress(XEvent *ev) } void +printname(void) +{ + printf("%s\n", cimg->filename); +} + +void keypress(XEvent *ev) { KeySym key; @@ -413,6 +419,9 @@ keypress(XEvent *ev) case XK_o: setview(ASPECT); break; + case XK_Return: + printname(); + break; case XK_f: setview(FULL_STRETCH); break;