Introduction
Introduction Statistics Contact Development Disclaimer Help
print name to stdout on enter - lel - Farbfeld image viewer
git clone git://git.codemadness.org/lel
Log
Files
Refs
README
LICENSE
---
commit f5218c3944254bcfcb184de6ffff153fc4e61956
parent be0f93f92b7b36856acb9709b9ee550b89899db6
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 2 Aug 2014 00:20:40 +0000
print name to stdout on enter
Signed-off-by: Hiltjo Posthuma <[email protected]>
Diffstat:
M TODO | 2 +-
M lel.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;
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.