From e50dd187814cfa974844d3c55142ef71a3aa5bc6 Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 22 Dec 2020 07:03:45 +0000 Subject: choose now uses ledit if $DISPLAY isn't set --- choose | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3