You are not logged in.

#1 2009-06-16 14:08:11

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

[SOLVED]dwm bars

I have some questions about dwm configuration. First of all how can I move the dwm bar to the bottom and make a new bar at the top where I can put my conky system monitor.

Like how this guy did it with his nice plain desktop:
21502809.png

Last edited by zowki (2009-06-19 15:55:55)


How's my programming? Call 1-800-DEV-NULL

Offline

#2 2009-06-16 14:19:46

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: [SOLVED]dwm bars

If you can figure out how to change anything else in DWM, you can figure this out. Have a look at config.h

static Bool showbar                 = True;     /* False means no bar */
static Bool topbar                  = True;     /* False means bottom bar */

Offline

#3 2009-06-17 07:58:03

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED]dwm bars

I changed topbar to false and the dwm bar went to the bottom. But how do I create that extra bar at the top.


How's my programming? Call 1-800-DEV-NULL

Offline

#4 2009-06-17 08:44:54

lunch_box
Member
Registered: 2008-10-21
Posts: 16

Re: [SOLVED]dwm bars

You could just use conky at full width with a black background (in the case above). Not sure if it's possible to in dwm but if you can then set a margin as well so your apps don't cover the conky (if that's what you wanted).

Offline

#5 2009-06-17 11:31:41

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED]dwm bars

I don't think you can set a margin. I looked through the config.h but couldnt find anything of that sort. But seriously, I've seen this cool extra conky bar in lots of dwm screenshots.


How's my programming? Call 1-800-DEV-NULL

Offline

#6 2009-06-17 11:35:47

Lexion
Member
Registered: 2008-03-23
Posts: 510

Re: [SOLVED]dwm bars

use dzen2 in the repos.  It works great and I use it with xmonad.  Check the Arch Linux wiki for a quick tutorial on how to get it to work.


urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand

Offline

#7 2009-06-17 11:40:29

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [SOLVED]dwm bars

If you want a persistent bar, you're going to need to modify dwm.c to allow a top gap.  I've got mine set up to allow one but it's at the bottom and I'm sure more modifications would need to be made for it to be moved to the top.  To have one at the bottom it's just one line to change.

Edit: At least with dwm 4.7 this is the case.

Last edited by rson451 (2009-06-17 11:40:45)


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#8 2009-06-17 12:47:18

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED]dwm bars

rson451 wrote:

If you want a persistent bar, you're going to need to modify dwm.c to allow a top gap.  I've got mine set up to allow one but it's at the bottom and I'm sure more modifications would need to be made for it to be moved to the top.  To have one at the bottom it's just one line to change.

Edit: At least with dwm 4.7 this is the case.

I actually prefer if the gap is at the bottom and the main dwm bar at top so. So could you tell me how to make these configurations?
I saw your screenshot of your desktop from your website. That configuration you made is exactly what I want to achieve.

Last edited by zowki (2009-06-17 12:49:21)


How's my programming? Call 1-800-DEV-NULL

Offline

#9 2009-06-17 15:20:10

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [SOLVED]dwm bars

I am using an ollld version of dwm, so this may not apply now.  My dwm is all patched to hell so I'll just give you an idea of where to look.  In the setup() function, there is a line:

  sh = DisplayHeight(dpy, screen);

I modified that to subtract a constant:

  sh = DisplayHeight(dpy, screen) - BOTTOM_BAR_HEIGHT;

then #define'd the constant in my config.h.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#10 2009-06-18 09:31:01

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED]dwm bars

That didnt seem to work. It probably only works on your old version. I don't even think you can slot conky in there in the first place. Dwm treats conky like a program and tiles it with your other windows.


How's my programming? Call 1-800-DEV-NULL

Offline

#11 2009-06-18 13:35:26

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [SOLVED]dwm bars

You need to set your .conkyrc up correctly to prevent that. The below should suffice:

own_window yes
own_window_type override

archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#12 2009-06-19 10:41:39

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED]dwm bars

I got conky to be rendered as a window thanks to your .conkyrc tip but I still can't get dwm to make that bottom gap.
I tried "sh = DisplayHeight(dpy, screen) - BOTTOM_BAR_HEIGHT;" and defined BOTTOM_BAR_HEIGHT to 15 in config.h but it still didnt work.

Edit:
I have been doing some more hunting. Could any of these be the right variable?

static int sx, sy, sw, sh; /* X display screen geometry x, y, width, height */ 
static int by, bh, blw;    /* bar geometry y, height and layout symbol width */
static int wx, wy, ww, wh; /* window area geometry x, y, width, height, bar excluded */

Edit 2:
I FINALLY DID IT! It was in the updategeom() function. I did this:

wh = showbar ? info[i].height - bh - BOTTOM_BAR_HEIGHT : info[i].height;

Thank you guys for all your help!

Last edited by zowki (2009-06-19 14:22:11)


How's my programming? Call 1-800-DEV-NULL

Offline

#13 2009-06-21 22:07:44

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [SOLVED]dwm bars

Just saw that you figured it out.  Glad I could help (a little).


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

Board footer

Powered by FluxBB