Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
d27e3c1092 | |||
3a9f3a51ce | |||
53e92b5c17 | |||
d50ff5ca11 | |||
383e40dc21 | |||
8369e1736b | |||
c04b688cc0 | |||
4ebd7c4a21 | |||
dfe95cb546 | |||
8b633bf17d | |||
64697cdd0c | |||
5a3dfb1c40 | |||
4042a11e51 | |||
aa2f73fc88 | |||
f189781bbd |
2
.hgtags
2
.hgtags
@ -29,3 +29,5 @@ b6e09682c8adcb6569656bee73c311f9ab457715 2.3
|
|||||||
775f761a5647a05038e091d1c99fc35d3034cd68 2.6
|
775f761a5647a05038e091d1c99fc35d3034cd68 2.6
|
||||||
fbd9e9d63f202afe6834ccfdf890904f1897ec0b 2.7
|
fbd9e9d63f202afe6834ccfdf890904f1897ec0b 2.7
|
||||||
dd3d02b07cac44fbafc074a361c1002cebe7aae4 2.8
|
dd3d02b07cac44fbafc074a361c1002cebe7aae4 2.8
|
||||||
|
59b3024854db49739c6d237fa9077f04a2da847a 3.0
|
||||||
|
8f0f917ac988164e1b4446236e3a6ab6cfcb8c67 3.1
|
||||||
|
1
Makefile
1
Makefile
@ -23,7 +23,6 @@ ${OBJ}: dmenu.h config.mk
|
|||||||
dmenu: ${OBJ}
|
dmenu: ${OBJ}
|
||||||
@echo CC -o $@
|
@echo CC -o $@
|
||||||
@${CC} -o $@ ${OBJ} ${LDFLAGS}
|
@${CC} -o $@ ${OBJ} ${LDFLAGS}
|
||||||
@strip $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo cleaning
|
@echo cleaning
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# dmenu version
|
# dmenu version
|
||||||
VERSION = 3.0
|
VERSION = 3.2
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
|
|||||||
|
|
||||||
# flags
|
# flags
|
||||||
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
|
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
|
||||||
LDFLAGS = ${LIBS}
|
LDFLAGS = -s ${LIBS}
|
||||||
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
|
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
|
||||||
#LDFLAGS = -g ${LIBS}
|
#LDFLAGS = -g ${LIBS}
|
||||||
|
|
||||||
|
4
dmenu.h
4
dmenu.h
@ -1,6 +1,4 @@
|
|||||||
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
|
/* See LICENSE file for copyright and license details. */
|
||||||
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
|
|
||||||
* See LICENSE file for license details. */
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
|
#define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
|
||||||
|
27
dmenu_path
27
dmenu_path
@ -1,9 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
CACHE=$HOME/.dmenu_cache
|
||||||
IFS=:
|
IFS=:
|
||||||
for dir in $PATH
|
|
||||||
do
|
uptodate() {
|
||||||
for file in "$dir"/*
|
test ! -f $CACHE && return 1
|
||||||
|
for dir in $PATH
|
||||||
do
|
do
|
||||||
test -x "$file" && echo "${file##*/}"
|
test $dir -nt $CACHE && return 1
|
||||||
done
|
done
|
||||||
done | sort | uniq
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! uptodate
|
||||||
|
then
|
||||||
|
for dir in $PATH
|
||||||
|
do
|
||||||
|
for file in "$dir"/*
|
||||||
|
do
|
||||||
|
test -x "$file" && echo "${file##*/}"
|
||||||
|
done
|
||||||
|
done | sort | uniq > $CACHE.$$
|
||||||
|
mv $CACHE.$$ $CACHE
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat $CACHE
|
||||||
|
4
draw.c
4
draw.c
@ -1,6 +1,4 @@
|
|||||||
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
|
/* See LICENSE file for copyright and license details. */
|
||||||
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
|
|
||||||
* See LICENSE file for license details. */
|
|
||||||
#include "dmenu.h"
|
#include "dmenu.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
22
main.c
22
main.c
@ -1,6 +1,4 @@
|
|||||||
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
|
/* See LICENSE file for copyright and license details. */
|
||||||
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
|
|
||||||
* See LICENSE file for license details. */
|
|
||||||
#include "dmenu.h"
|
#include "dmenu.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
@ -135,6 +133,8 @@ initfont(const char *fontstr) {
|
|||||||
char *def, **missing;
|
char *def, **missing;
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
|
if(!fontstr || fontstr[0] == '\0')
|
||||||
|
eprint("error, cannot load font: '%s'\n", fontstr);
|
||||||
missing = NULL;
|
missing = NULL;
|
||||||
if(dc.font.set)
|
if(dc.font.set)
|
||||||
XFreeFontSet(dpy, dc.font.set);
|
XFreeFontSet(dpy, dc.font.set);
|
||||||
@ -435,28 +435,28 @@ main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
/* command line args */
|
/* command line args */
|
||||||
for(i = 1; i < argc; i++)
|
for(i = 1; i < argc; i++)
|
||||||
if(!strncmp(argv[i], "-b", 3)) {
|
if(!strcmp(argv[i], "-b")) {
|
||||||
bottom = True;
|
bottom = True;
|
||||||
}
|
}
|
||||||
else if(!strncmp(argv[i], "-fn", 4)) {
|
else if(!strcmp(argv[i], "-fn")) {
|
||||||
if(++i < argc) font = argv[i];
|
if(++i < argc) font = argv[i];
|
||||||
}
|
}
|
||||||
else if(!strncmp(argv[i], "-nb", 4)) {
|
else if(!strcmp(argv[i], "-nb")) {
|
||||||
if(++i < argc) normbg = argv[i];
|
if(++i < argc) normbg = argv[i];
|
||||||
}
|
}
|
||||||
else if(!strncmp(argv[i], "-nf", 4)) {
|
else if(!strcmp(argv[i], "-nf")) {
|
||||||
if(++i < argc) normfg = argv[i];
|
if(++i < argc) normfg = argv[i];
|
||||||
}
|
}
|
||||||
else if(!strncmp(argv[i], "-p", 3)) {
|
else if(!strcmp(argv[i], "-p")) {
|
||||||
if(++i < argc) prompt = argv[i];
|
if(++i < argc) prompt = argv[i];
|
||||||
}
|
}
|
||||||
else if(!strncmp(argv[i], "-sb", 4)) {
|
else if(!strcmp(argv[i], "-sb")) {
|
||||||
if(++i < argc) selbg = argv[i];
|
if(++i < argc) selbg = argv[i];
|
||||||
}
|
}
|
||||||
else if(!strncmp(argv[i], "-sf", 4)) {
|
else if(!strcmp(argv[i], "-sf")) {
|
||||||
if(++i < argc) selfg = argv[i];
|
if(++i < argc) selfg = argv[i];
|
||||||
}
|
}
|
||||||
else if(!strncmp(argv[i], "-v", 3))
|
else if(!strcmp(argv[i], "-v"))
|
||||||
eprint("dmenu-"VERSION", © 2006-2007 Anselm R. Garbe, Sander van Dijk\n");
|
eprint("dmenu-"VERSION", © 2006-2007 Anselm R. Garbe, Sander van Dijk\n");
|
||||||
else
|
else
|
||||||
usage();
|
usage();
|
||||||
|
4
util.c
4
util.c
@ -1,6 +1,4 @@
|
|||||||
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
|
/* See LICENSE file for copyright and license details. */
|
||||||
* © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
|
|
||||||
* See LICENSE file for license details. */
|
|
||||||
#include "dmenu.h"
|
#include "dmenu.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
Reference in New Issue
Block a user