diff options
author | epoch <epoch@thebackupbox.net> | 2022-05-25 07:35:56 +0000 |
---|---|---|
committer | epoch <epoch@thebackupbox.net> | 2022-05-25 07:35:56 +0000 |
commit | d88e0f03027fd8ab33c822f975b970d522367795 (patch) | |
tree | bc288880eb8db58f2b9e7449a8adb471dda52f81 /choose | |
parent | af7a8f4e59f0d3dbf0608eba169adab6c0d1951b (diff) | |
download | uritools-d88e0f03027fd8ab33c822f975b970d522367795.tar.gz uritools-d88e0f03027fd8ab33c822f975b970d522367795.zip |
added ability to set the colors for choose's dmenu from X resources
Diffstat (limited to 'choose')
-rwxr-xr-x | choose | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |