summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xconfigure31
-rwxr-xr-xdmenu_app2
3 files changed, 33 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f3c7a7c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
Makefile
diff --git a/configure b/configure
new file mode 100755
index 0000000..1e55dd5
--- /dev/null
+++ b/configure
@@ -0,0 +1,31 @@
1#!/bin/sh
2
3for arg in $@; do
4 case $arg in
5 --prefix=*)
6 destdir=$(echo $arg | cut -d= -f2-)
7 ;;
8 *)
9 ;;
10 esac
11done
12
13if [ -z "$destdir" ]; then
14 destdir="/usr"
15fi
16
17cat <<MAKEFILE > Makefile
18# Generated on $(date) by $(whoami)@$(hostname)
19
20DESTDIR = $destdir
21
22install:
23 @mkdir -vp "\$(DESTDIR)/bin/"
24 @install -vm 755 dmenu_app "\$(DESTDIR)/bin/"
25
26uninstall:
27 @-rm -fv -- '\$(DESTDIR)/bin/dmenu_app'
28
29.PHONY: install uninstall
30MAKEFILE
31# vim: set ts=8 sw=8 tw=0 noet :
diff --git a/dmenu_app b/dmenu_app
index ded6b6d..d6169b1 100755
--- a/dmenu_app
+++ b/dmenu_app
@@ -29,7 +29,7 @@ if [ ! -f "$cache_file" ] || [ "$(head -n1 "$cache_file")" != "$checksum" ]; the
29 wait 29 wait
30fi 30fi
31 31
32choice=$(cat $cache_file | tail -n +2 | cut -d: -f1 | sort -h | dmenu $@) 32choice=$(cat $cache_file | tail -n +2 | cut -d: -f1 | sort -h | dmenu "$@")
33if [ -n "$choice" ]; then 33if [ -n "$choice" ]; then
34 command=$(sed -n "s/^$choice:\(.*\)$/\1/p" "$cache_file") 34 command=$(sed -n "s/^$choice:\(.*\)$/\1/p" "$cache_file")
35 if [ -n "$command" ]; then 35 if [ -n "$command" ]; then