lsw

lists window titles of X clients to stdout
git clone git://git.suckless.org/lsw
Log | Files | Refs | README | LICENSE

commit 3073d442c5d34c3a65b928e2f9a0b26d680d279b
parent 98c295b55eb613b7c061bfe54a7d4e017df6c6a2
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Sat,  4 Jun 2011 19:34:05 +0100

0x%lx only
Diffstat:
Mlsw.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lsw.c b/lsw.c @@ -35,7 +35,7 @@ main(int argc, char *argv[]) { if(i == argc) lsw(DefaultRootWindow(dpy)); - while(i < argc) + else while(i < argc) lsw(strtol(argv[i++], NULL, 0)); XCloseDisplay(dpy); @@ -55,7 +55,7 @@ lsw(Window win) { if(XGetWindowAttributes(dpy, win, &wa) && !wa.override_redirect) { getname(wins[i], buf, sizeof buf); if(lflag) - printf("0x%07lx %s\n", wins[i], buf); + printf("0x%lx %s\n", wins[i], buf); else if(*buf) puts(buf); }