This is intended as a minimal tutorial about using dmenu as a multi-purpose menu and information bar.
First we will talk about the informative bar.
Afterward you should try the menu options of dmenu.
to create menus and other stuff with dmenu we'll need dmenu...
Debian/Ubuntu/others
apt-get dmenu
RedHat/Fedora
yum install dmenu
Arch
pacman -S dmenu
The informative bar is going to show all the interesting informations such as Wifi, battery, or volume statuses. One might also create a informative bar about packagemanager informations, runtime, musicplayer or whatever informations might be accessible to you.
To get system informations you might use programs like acpi for batterystats, iwconfig for networking informations.
For an example see the file status.sh
Important is that the informations are given line by line so dmenu can interprete them.
After creating the informations these are piped into dmenu, as seen in dmenu_status.
A menu could be used to control daemons like the moc-daemon, as it is done by dmenu_mocp https://github.com/mutantturkey/mocicon/blob/master/dmenu_mocp/dmenu_mocp
To create a menu you first have to pipe the the menuitems line by line into dmenu. Afterwards dmenu returns the selected item as a sting which can be matched. Now all that is missing are the if causes that check which item has been selected and that launches applications, scripts or manipulates a daemon.
For an example see the dmenu_mocp script by mutantturkey or the dmenu_status_interactive