Named pipes can be used for inter-process communication (IPC).Two different application can send and read data using named pipes.
Also already used aptitude to install xmonad, so that might have pulled in some dependencies necessary for the following steps. So to build xmobar I had to build and install a bunch of dependencies.
zlib1g-dev would be pulled in by libghc6-zlib-dev anyway. Ubuntu doesn't have a package for xmobar, nor for many of its dependencies.
Xmobar also has an alsa plugin but distributions do not always compile xmobar with alsa support.
An alternative approach is to write a small script that will parse the output of the command and then call it from xmobar in regular intervals to show the current volume levels.
This however requires xmobar to frequently call an external command/script.
Also if you happen to use a large frequency you might notice some “lag” from the time you change the volume levels to the time this change is reflected in xmobar.
Ideally, my workspace would look something like this.
(two notes about this picture: first, I might have to post another blog post about taking screenshots with xmonad.
Bash exists in one or several of those paths, and bash can execute programs anywhere. Run your "get-volume" script, replace your current line with: Run Com "bash" ["~/.xmonad/get-volume"] "myvolume" 10 I don't know why the interpreter has to be specified when running scripts(in eg home directory), but my guess is that xmobar looks only in "global" directories specified by the PATH variable for executables.