all repos — dmenu @ 86e9e6f1ecc4711d8fe447f5c0f2c1bd0feb8568

my build of dmenu

simpler lsx
Connor Lane Smith cls@lubutu.com
Sat, 18 Jun 2011 07:50:46 +0100
commit

86e9e6f1ecc4711d8fe447f5c0f2c1bd0feb8568

parent

eadf090413c530e69e8568492ebeb4b4087bd2ad

3 files changed, 6 insertions(+), 11 deletions(-)

jump to
M dmenu.1dmenu.1

@@ -95,4 +95,5 @@ .TP

.B Ctrl\-y Paste the current X selection into the input field. .SH SEE ALSO -.IR dwm (1) +.IR dwm (1), +.IR lsx (1)
M lsx.1lsx.1

@@ -3,13 +3,9 @@ .SH NAME

lsx \- list executables .SH SYNOPSIS .B lsx -.RB [ \-v ] .RI [ directory ...] .SH DESCRIPTION .B lsx -lists the executables in each directory. If no directories are given the current -working directory is used. -.SH OPTIONS -.TP -.B \-v -prints version information to stdout, then exits. +lists the executables in each +.IR directory . +If none are given the current working directory is used.
M lsx.clsx.c

@@ -14,8 +14,6 @@ int i;

if(argc < 2) lsx("."); - else if(!strcmp(argv[1], "-v")) - puts("lsx-0.2, © 2006-2011 dmenu engineers, see LICENSE for details"); else for(i = 1; i < argc; i++) lsx(argv[i]); return EXIT_SUCCESS;

@@ -34,7 +32,7 @@ return;

} while((d = readdir(dp))) { snprintf(buf, sizeof buf, "%s/%s", dir, d->d_name); - if(stat(buf, &st) == 0 && S_ISREG(st.st_mode) && access(buf, X_OK) == 0) + if(!stat(buf, &st) && S_ISREG(st.st_mode) && access(buf, X_OK) == 0) puts(d->d_name); } closedir(dp);