Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently installed conky-cli and got it running on the upper bar in dwm with this simple command:

conky | while read -r; do xsetroot -name "$REPLY"; done &

And I wanted to get colored output with conky, thought this could be done with sed like:

conky | sed .. | while ..

But don't know how to get the output from the pipe with sed and convert it to a color.

share|improve this question
What output is conky-cli returning? – slm Apr 22 '13 at 20:19

To get colours in dwm's status bar with conky you have two options:

  • patch dwm with the statuscolours patch1 and use conky-cli with the exec variable for the coloured text.

  • pipe conky to dzen and let dzen handle the colourizing (this is more of a hack as it paints over the dwm bar).

A third approach, which I find much cleaner2, is to patch dwm with statuscolours and use a shell script to write the various system information to the root window: screenshot.

1. See my bitbucket repo for a statuscolours patch for dwm 6.0
2. You can also find my statusbar script in my bitbucket repo.

share|improve this answer
Thanks , I'll try this asap, I'm sure I'll find it useful. – user37670 Apr 22 '13 at 21:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.