From d88e0f03027fd8ab33c822f975b970d522367795 Mon Sep 17 00:00:00 2001 From: epoch Date: Wed, 25 May 2022 07:35:56 +0000 Subject: added ability to set the colors for choose's dmenu from X resources --- choose | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'choose') diff --git a/choose b/choose index 87fb4c2..763c71c 100755 --- a/choose +++ b/choose @@ -15,7 +15,15 @@ if [ $DISPLAY ];then #usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor] # [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid] if which dmenu 2>&1 >/dev/null;then - dmenu -l 10 -p "$prompt" -nb '#000000' -nf '#00aa00' -sb '#006600' -sf '#00ff00' + nb="$(xrdb -get choose.nb)" + nf="$(xrdb -get choose.nf)" + sb="$(xrdb -get choose.sb)" + sf="$(xrdb -get choose.sf)" + if [ "$nb" ];then nb="-nb $nb"; fi + if [ "$nf" ];then nf="-nf $nf"; fi + if [ "$sb" ];then sb="-sb $sb"; fi + if [ "$sf" ];then sf="-sf $sf"; fi + dmenu -l 10 -p "$prompt" $nb $nf $sb $sf else printf "dmenu missing. %s\n" "https://tools.suckless.org/dmenu/" fi -- cgit v1.2.3