I’ve been annoyed that Mac (and Windows?) users have been able to write math in their launcher, while I with my i3wm and dmenu couldn’t. I decided to do something about that today.
mmenu is a short script intended to be a replacement for dmenu_run. It works the same, executing the program you select, except that if you don’t select the name of a program, the result is fed to python to be executed.
I also added a function to convert from a number to another base, as I find myself needing to do that often. If you have a suggestion for other useful functions, do tell, and I’ll consider adding it (or you could just do a pull request).
The script menu-calc is great, and does something similar, but because it’s just an executable in your $PATH, it has some limitations; you can’t just write an expression but have to prepend =, you have to quote stuff, etc. I found there to be just enough quirks and friction that I never really ended up using it even though I’ve had it installed for months.
Edit: a short screencast: https://gfycat.com/ElectricDesertedGrub
Edit 2: I created a git repo for it: https://github.com/mortie/mmenu