It isn't possible to run tmenu for any purpose except launching applications. Many people use dmenu in scripts like:
echo "apple\norange\nbanana\n" | tmenu >> grocerylist.txt
The solution is to add | sh to the last line of tmenu_run and remove lines 134-142 from tmenu.c. I know I'll need to see how to preserve some of the lines. Then, running tmenu returns the selection to STDOUT while using tmenu_run runs the selection too (like dmenu).
It isn't possible to run tmenu for any purpose except launching applications. Many people use dmenu in scripts like:
echo "apple\norange\nbanana\n" | tmenu >> grocerylist.txtThe solution is to add
| shto the last line of tmenu_run and remove lines 134-142 from tmenu.c. I know I'll need to see how to preserve some of the lines. Then, running tmenu returns the selection to STDOUT while using tmenu_run runs the selection too (like dmenu).