Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
28b6ea0f67 | |||
598d72fba9 | |||
007be12f2b | |||
6b5b580aff | |||
d8b48d64e1 | |||
a71424ac0e | |||
f1ab687c62 |
2
.hgtags
2
.hgtags
@ -23,3 +23,5 @@ c7f5f4d543170f03d70468e98a3a0ec8d2c4161b 1.9
|
||||
90f0e34e7f118c9ad3227a1606211ee825942b1c 2.2
|
||||
b6e09682c8adcb6569656bee73c311f9ab457715 2.3
|
||||
9e9036cbfb4b7306c6fb366249e81dc0e65bdfde 2.4
|
||||
03e83e2788c83ddd63b45a667939d7ec783c98cb 2.4.1
|
||||
1ca5d430524e838c52ede912533cb90108c5cd66 2.4.2
|
||||
|
@ -1,5 +1,5 @@
|
||||
# dmenu version
|
||||
VERSION = 2.4.1
|
||||
VERSION = 2.5
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
|
18
dmenu.h
18
dmenu.h
@ -29,16 +29,16 @@ typedef struct {
|
||||
} font;
|
||||
} DC; /* draw context */
|
||||
|
||||
extern int screen;
|
||||
extern Display *dpy;
|
||||
extern DC dc; /* global drawing context */
|
||||
int screen;
|
||||
Display *dpy;
|
||||
DC dc; /* global drawing context */
|
||||
|
||||
/* draw.c */
|
||||
extern void drawtext(const char *text, unsigned long col[ColLast]);
|
||||
extern unsigned int textw(const char *text);
|
||||
extern unsigned int textnw(const char *text, unsigned int len);
|
||||
void drawtext(const char *text, unsigned long col[ColLast]);
|
||||
unsigned int textw(const char *text);
|
||||
unsigned int textnw(const char *text, unsigned int len);
|
||||
|
||||
/* util.c */
|
||||
extern void *emalloc(unsigned int size); /* allocates memory, exits on error */
|
||||
extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */
|
||||
extern char *estrdup(const char *str); /* duplicates str, exits on allocation error */
|
||||
void *emalloc(unsigned int size); /* allocates memory, exits on error */
|
||||
void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */
|
||||
char *estrdup(const char *str); /* duplicates str, exits on allocation error */
|
||||
|
@ -1,2 +1,9 @@
|
||||
#!/bin/sh
|
||||
/bin/ls -lL `echo $PATH | tr : ' '` 2> /dev/null | awk '$1 ~ /^[^d].*x/ { print $NF }' | sort | uniq
|
||||
IFS=:
|
||||
for dir in $PATH
|
||||
do
|
||||
for file in "$dir"/*
|
||||
do
|
||||
test -x "$file" && echo "${file##*/}"
|
||||
done
|
||||
done | sort | uniq
|
||||
|
6
main.c
6
main.c
@ -418,7 +418,9 @@ main(int argc, char *argv[]) {
|
||||
XModifierKeymap *modmap;
|
||||
XSetWindowAttributes wa;
|
||||
|
||||
if(isatty(STDIN_FILENO)) {
|
||||
if(argc == 2 && !strncmp("-v", argv[1], 3))
|
||||
eprint("dmenu-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n");
|
||||
else if(isatty(STDIN_FILENO)) {
|
||||
fputs("error: dmenu can't run in an interactive shell\n", stdout);
|
||||
usage();
|
||||
}
|
||||
@ -445,8 +447,6 @@ main(int argc, char *argv[]) {
|
||||
else if(!strncmp(argv[i], "-sf", 4)) {
|
||||
if(++i < argc) selfg = argv[i];
|
||||
}
|
||||
else if(!strncmp(argv[i], "-v", 3))
|
||||
eprint("dmenu-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n");
|
||||
else
|
||||
usage();
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
Reference in New Issue
Block a user