summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchoose6
1 files changed, 5 insertions, 1 deletions
diff --git a/choose b/choose
index 73c74aa..be4602a 100755
--- a/choose
+++ b/choose
@@ -6,4 +6,8 @@
#message=$1
#shift
#sed 's|,|\\,|g;s|:|\\:|g' | tr '\n' ',' | rev | cut -b2- | rev | tr '\n' '\0' | xargs -0 xmessage -nearmouse "$@" "$message" -print -buttons
-dmenu -l 10 -p "$1"
+if [ $DISPLAY ];then
+ dmenu -l 10 -p "$1"
+else
+ printf "%s" "$1" ; ledit head -n1
+fi