[xmonad] Allow xmonad to get input from spawned applications
Ivan Miljenovic
ivan.miljenovic at gmail.com
Sat Apr 12 21:21:04 EDT 2008
I wanted to try and get a pop-up message shown on a key-press showing
the current mpd information. Preferably, I'd like to keep everything
inside xmonad rather than relying on external scripts.
Now, I could have something like "mpc | head -1 | dzen"... but I
wanted to use something like notify-send (part of libnotify) to do so,
as its less obtrusive and handles non-Latin characters better (i.e.
using fontconfig, etc.).
However, since notify-send doesn't seem to want to take piped inputs,
I'd first have to read and parse the mpc data before I could call
notify-send. This would work well... if only xmonad let me read data
from the processes it spawns. As such, I think there should be a new
operation that lets you obtain the stdout output from the programs
that are spawned... something like "spawnOutput :: String -> m
String".
Is such a thing feasible/possible/good? I _could_ just have a
seperate bash script to do this, but I'd like it to have my settings
as self-contained as possible.
--
Ivan Lazar Miljenovic
More information about the xmonad
mailing list