You are not logged in.

#1 2010-01-05 08:22:18

muchzill4
Member
From: Poland
Registered: 2009-03-30
Posts: 30

Dwm bar questions.

Hi,

I've tried xmonad - did everything like I wanted there, but it's dead slow - at least for me. So I'm back @ dwm trying to fix things to my liking.

The only thing that makes me cry is the default way of piping info to dwm bar. For me it's just illegible - one color. So, here are my questions:
1) is it possible to make xsetroot display colored fonts? how?
2) there's a patch for dwm called "statuscolors" am I right thinking that it can be extended to allow more colors so that I can use them with conky piped to xsetroot?

3) the only easy way I can think of is placing dzen2 bar over dwm bar, but then, window titles (if too long) are hidden under this bar, so I've tried making xsetroot -name with huge space between " " so that it fits the dzen2 and window titles know where to be wrapped, is it a proper way to do this? wink

Offline

#2 2010-01-05 10:23:48

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: Dwm bar questions.

i'd say use the statuscolors patch + pipe conky-cli to dwm


☃ Snowman ☃

Offline

#3 2010-01-05 11:34:27

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Dwm bar questions.

There are a couple of patches at suckless.org that should do what you want. Instead of using conky-cli, you might just try scripting to get the output you want (depending on what info you need).  You can checkout my dwm configs here.

Scott

edit: sorry, link fixed smile

Last edited by firecat53 (2010-01-05 15:00:08)

Offline

#4 2010-01-05 14:25:49

muchzill4
Member
From: Poland
Registered: 2009-03-30
Posts: 30

Re: Dwm bar questions.

firecat53 can you check your link?

Offline

#5 2010-01-05 16:18:48

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Dwm bar questions.

muchzill4 wrote:

Hi,

I've tried xmonad - did everything like I wanted there, but it's dead slow - at least for me. So I'm back @ dwm trying to fix things to my liking.

It really is hard to break free from dwm once you've used it for any length of time. It's so hard to beat in philosophy and efficiency.

You're on the right track, as others have pointed out the statuscolor patch is what you're after.  As for the bar itself, you can use a shell script to produce the values and then simply print the results with echo -e.  If you use conky-cli (which is fine too) you'll need to use the exec variable for each colourized string, otherwise the escape codes won't be evaluated and you'll end up with a bunch of back slashes in the statusbar.  It should end up looking something like this:

${exec echo -e \\x04}${upspeed wlan0}K ${exec echo -e \\x07}${downspeed wlan0}K${exec echo -e \\x01}

dzen2 is also a fine solution that many users implement.  You have already mentioned some disadvantages it has, but there are workarounds such as patching dwm to limit the startusbar width.  Yet another disadvantage is that if you want to toggle the statusbar (Mod+b) the dzen statusbar will remain.

At any rate, good luck and show us what you end up with!  Here's a screenshot of my setup using statuscolor:

4247656619_7c325a3819_m.jpg

Last edited by thayer (2010-01-05 16:21:07)


thayer williams ~ cinderwick.ca

Offline

#6 2010-01-06 14:03:17

muchzill4
Member
From: Poland
Registered: 2009-03-30
Posts: 30

Re: Dwm bar questions.

Silly example:

wdate() {
wdate=$(date +'%a %d %b %H:%M')
echo -e "\x01$wdate"
}

sep=`echo -e "\x06|"`


while true
do
    xsetroot -name "${sep} $(wdate)"
    sleep 1
done

Why is that so, that when I have space between ${sep} and $(wdate) it's double space in xsetroot? (echoing ${sep} $(wdate) works allright).

Offline

#7 2010-01-06 15:46:55

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Dwm bar questions.

muchzill4 wrote:

Why is that so, that when I have space between ${sep} and $(wdate) it's double space in xsetroot? (echoing ${sep} $(wdate) works allright).

I noticed this as well when using the statuscolor patch.  It appears that the escape codes themselves generate a space once evaluated.  In your case, the escape code \x01 in front of $wdate is the culprit.


thayer williams ~ cinderwick.ca

Offline

Board footer

Powered by FluxBB