You are not logged in.

#1 2008-07-18 09:46:06

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

dwm/dzen status bar oddity

I am trying out dwm with dzen and things are working pretty well except for some problems with getting dzen to show on top of the dwm status bar.

Here is the pertinent part of my .xinitrc for my first attempt:

sysmon.rb | dzen2 -x 700 -y 0 -w 636 -ta r -fn '-*-terminus-*-*-*-*-*-*-*-*-*-*-*-*' -fg wheat -p  -e 'onstart=raise;sigusr1=raise' &
exec dwm

When I start X, dwm starts fine and if I do ps -ef I can see that sysmon.rb and dzen are both running, but I cannot see the dzen since apparently dwm has painted over it and continues to paint over it. If I send dzen SIGHUP1, then it gets raised above dwm, but I don't want to have to do this every time I log in.

My second att empt was the following.

# Start the window manager
dwm &
wm_pid="$!"
sysmon.rb | dzen2 -x 700 -y 0 -w 636 -ta r -fn '-*-terminus-*-*-*-*-*-*-*-*-*-*-*-*' -fg wheat -p  -e 'onstart=raise;sigusr1=raise' &
wait $wm_pid

This works except for one minor nit. When I do it this way, the right side of the dwm status bar (which normally shows the version of dwm) shows EOF. This is presumably because I have not piped anything to dwm and I have put it in the background.

So is there anyone out there using dzen for a status bar with dwm? How did you get around this z-order issue and get dzen to show up on top properly?

Offline

#2 2008-07-18 10:38:47

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: dwm/dzen status bar oddity

I have basically just hacked the dwm.c to make room for the dzenbar. If you're interested I'll look it up.



You could do it another way. Do an echo "                                                               " | dwm . Place the dzenbar in empty space in the dwmbar.

Offline

#3 2008-07-18 10:44:37

strankan
Member
From: Sundsvall - Sweden
Registered: 2006-11-08
Posts: 97

Re: dwm/dzen status bar oddity

I am surely interested to see your hacked version smile Been looking for a way to make that work myself.

Offline

#4 2008-07-18 11:14:17

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: dwm/dzen status bar oddity

Hi strankan,

Here's a post with links to the file: http://bbs.archlinux.org/viewtopic.php? … 94#p353394 The dwm.c was for dwm 4.9, but I guess the changes could easily be adopted to 4.7 or 5.0.1.

The funny thing is that it was you that requested them the last time as well. smile You never got that freetime after work, huh?

BTW: The dwm.c with two simple hacks. The first on line 51 (to make room for top right dzen2) and the second on line 1483 to make room for bottom dzen2 bar.

Last edited by Ashren (2008-07-18 11:25:12)

Offline

#5 2008-07-18 17:09:52

strankan
Member
From: Sundsvall - Sweden
Registered: 2006-11-08
Posts: 97

Re: dwm/dzen status bar oddity

Hehe I think I ended up playing around with evilwm for a while and forgot about dwm. This time though I'm hooked. Patched with "layout per tag" and it's way more usable to me. Thanks for the post btw.

Offline

#6 2008-07-18 18:28:24

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: dwm/dzen status bar oddity

Ashren wrote:

I have basically just hacked the dwm.c to make room for the dzenbar. If you're interested I'll look it up.

You could do it another way. Do an echo "                                                               " | dwm . Place the dzenbar in empty space in the dwmbar.

I'll probably have to look at the hacked version then. Your second solution doesn't work. Even though it's just spaces, dwm paints the background color, and this still paints over the already present dzen. I also still get the "EOF" at the end of the line. Perhaps it would be an interesting hack to make dwm not paint the background color. It would solve my problem as welll as make for an interesting effect. Looks like I'll be examining the dwm code and your patch.

I did get it to "work" by just using the second option and moving dzen over so it covers the "EOF". It's a kludge, but it does the trick.

This is off-topic, but have either of you successfully applied the moveresize patch to dwm? I've tried it and it seems like the dwm-5.0 patch doesn't work for dwm 5.0 or 5.0.1. There are a number of missing variables and it seems that the Client and Layout structs have changed.

Thanks again.

Offline

#7 2008-07-18 19:38:44

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: dwm/dzen status bar oddity

Jbromley, I did not try out the second solution myself, but I saw it mentioned somewhere on the dwm mailing list by Anselm. I know that my hack used to work and still would work if one places -(xxx)'s the correct places. Dwm's code is quite easy to comprehend, so I think its just a matter of reading the code plus trial and error. It worked for me. I'll look into 5.0.1 next week perhaps.

Offline

Board footer

Powered by FluxBB