re-applied Peter Hartlich's and Jukkas dmenu-related patches, for odd reasons they disappeared 7195e941
Anselm R Garbe · 2008-04-09 23:31 3 file(s) · +10 −10
config.mk +1 −1
1 1
# dmenu version
2 -
VERSION = 3.6
2 +
VERSION = 3.7
3 3
4 4
# Customize below to fit your system
5 5
dmenu_path +8 −8
3 3
IFS=:
4 4
5 5
uptodate() {
6 -
	test ! -f $CACHE && return 1
6 +
	test -f "$CACHE" &&
7 7
	for dir in $PATH
8 8
	do
9 -
		test $dir -nt $CACHE && return 1
9 +
		test ! $dir -nt "$CACHE" || return 1
10 10
	done
11 -
	return 0
12 11
}
13 12
14 13
if ! uptodate
15 14
then
16 15
	for dir in $PATH
17 16
	do
18 -
		for file in "$dir"/*
17 +
		cd "$dir" &&
18 +
		for file in *
19 19
		do
20 -
			test -x "$file" && echo "${file##*/}"
20 +
			test -x "$file" && echo "$file"
21 21
		done
22 -
	done | sort | uniq > $CACHE.$$
23 -
	mv $CACHE.$$ $CACHE
22 +
	done | sort -u > "$CACHE".$$ &&
23 +
	mv "$CACHE".$$ "$CACHE"
24 24
fi
25 25
26 -
cat $CACHE
26 +
cat "$CACHE"
dmenu_run +1 −1
1 1
#!/bin/sh
2 -
exe=`dmenu_path | dmenu $*` && exec $exe
2 +
exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe