summaryrefslogtreecommitdiff
path: root/choose
diff options
context:
space:
mode:
authorepoch <epoch@enzo.thebackupbox.net>2022-02-17 01:17:53 +0000
committerepoch <epoch@enzo.thebackupbox.net>2022-02-17 01:17:53 +0000
commitb6e986054a5e448b6ec2254bfe26b1bb90f260cb (patch)
treedf3f7ae5c95ec442f185fa5620dedd349471a7f5 /choose
parent3e40766f12e2a31fb9c0167116f1042acb52e4bc (diff)
downloaduritools-b6e986054a5e448b6ec2254bfe26b1bb90f260cb.tar.gz
uritools-b6e986054a5e448b6ec2254bfe26b1bb90f260cb.zip
added checks in choose to see if dmenu and pmenu are installed
Diffstat (limited to 'choose')
-rwxr-xr-xchoose12
1 files changed, 10 insertions, 2 deletions
diff --git a/choose b/choose
index 4edf7a7..87fb4c2 100755
--- a/choose
+++ b/choose
@@ -14,7 +14,15 @@ fi
if [ $DISPLAY ];then
#usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]
# [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]
- dmenu -l 10 -p "$prompt" -nb '#000000' -nf '#00aa00' -sb '#006600' -sf '#00ff00'
+ if which dmenu 2>&1 >/dev/null;then
+ dmenu -l 10 -p "$prompt" -nb '#000000' -nf '#00aa00' -sb '#006600' -sf '#00ff00'
+ else
+ printf "dmenu missing. %s\n" "https://tools.suckless.org/dmenu/"
+ fi
else
- pmenu -p "$prompt"
+ if which pmenu 2>&1 >/dev/null; then
+ pmenu -p "$prompt"
+ else
+ printf "pmenu missing. %s\n" "https://github.com/sgtpep/pmenu"
+ fi
fi