You are not logged in.
@pks: Not the font height, but the width. I just did -6 or it'll be too much.
In the version I have, you also need to fix drawtext to not overwrite things with dots:
Add this:
len = strlen(text);
Comment out these:
/* shorten text if necessary */
// for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--);
// if(!len)
// return;
memcpy(buf, text, len);
// if(len < olen)
// for(i = len; i && i > len - 3; buf[--i] = '.');
edit: You can also kick out olen after that.
Last edited by Procyon (2013-02-22 17:34:30)
Offline
@pks: Not the font height, but the width. I just did -6 or it'll be too much.
In the version I have, you also need to fix drawtext to not overwrite things with dots:
Add this:len = strlen(text);
Comment out these:
/* shorten text if necessary */ // for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - h; len--); // if(!len) // return; memcpy(buf, text, len); // if(len < olen) // for(i = len; i && i > len - 3; buf[--i] = '.');
Actually it has to be height because the macro TEXTW(x) is defined as follows:
#define TEXTW(X) (textnw(X, strlen(X)) + dc.font.height)
Offline
You have to change following code in the drawbar(Monitor *m) function. Line numbers are most likely not the same as my version of dwm is customized quite a bit.
--- a/dwm.c +++ b/dwm.c @@ -757,7 +757,7 @@ drawbar(Monitor *m) { dc.x += dc.w; } x = dc.x; - dc.w = TEXTW(stext); + dc.w = TEXTW(stext) - dc.font.height; dc.x = m->ww - dc.w; if(dc.x < x) { dc.x = x;
Many thanks! That has been annoying me for a while, probably because of my statuscolor patch it removed one space too many, but a quick correction as per below sorted it for me.
dc.w = TEXTW(stext) - dc.font.height /2;
Last edited by Meyithi (2013-02-22 19:38:13)
Offline
Is there a patch that can make dwm to overlap borders of clients in tile mode?
Hi Friends, can anyone give me the patch to remove double borders between two tiled windows and maintain only a single border between them. Many thanks.
I also would like to see a patch that removes double borders. Don't get me wrong I don't want to get spoonfed by you guys. It's just that I don't have the time to fully learn C programming to do it myself. And dwm is around for so long and no one has come up with this idea, yet, except monsterwm from C00kiemon5ter who does the trick? Overlapping borders are just easier on the eyes imho.
Maybe with the help of you guys we can come up with a patch together?
Thanks a lot
Last edited by andmars (2013-02-23 08:47:16)
Offline
I haven't confirmed this, but I suspect a gap (eg useless gap) patch would do this if you set the gap value to a negative. Setting gap to -1 with a 1px border should do it.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I haven't confirmed this, but I suspect a gap (eg useless gap) patch would do this if you set the gap value to a negative. Setting gap to -1 with a 1px border should do it.
Doesn't work with my uselessgaps patch but the one I use is a bit of a dog, removes nmaster and uses 5.9's old tile function.
Offline
I haven't confirmed this, but I suspect a gap (eg useless gap) patch would do this if you set the gap value to a negative. Setting gap to -1 with a 1px border should do it.
That probably won't work, as the border will only overlap on specific edges (e.g. right edge of master window, left side + top/bottom for stack windows) whereas gaps are applied on all four edges of every client.
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
Do you guys think shared tags could be implemented?
This would be a single set of tags shared among all screens. Clients are associated to tags as usual. Viewing a tag on a screen simply shows associated clients, regardless of whether these clients are/were previously displayed on another screen. The current implementation creates a separate set of tags for each attached screen.
Maybe this was too big of an idea for my first dwm patch Any help would be greatly appreciated.
EDIT: Clarified and grammar.
Last edited by mkaito (2013-02-24 06:11:01)
Fear me! I have root! Sometimes...
Offline
there would have to be some kind of indicator that there is a window next to it vertical and/or horizontal and then draw one pixel border (and delete current border) between them and resize window. the overlaping seems to be the simplest where only one would move one pixel. somthing to the degree that one would move one pixel in needed direction and then the others on order would look to see if it is needed.
--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.
Offline
This would be a single set of tags shared among all screens.
http://dwm.suckless.org/patches/single_tagset
Like this?
It's a fairly intrusive patch, but there is the version that implements a bunch of other patches at the same time. Maybe this is what you want.
"Unix is basically a simple operating system, but you have to be a genius to understand the simplicity." (Dennis Ritchie)
Offline
mkaito wrote:This would be a single set of tags shared among all screens.
http://dwm.suckless.org/patches/single_tagset
Like this?
It's a fairly intrusive patch, but there is the version that implements a bunch of other patches at the same time. Maybe this is what you want.
This seems to do what I want indeed. Guess it'll be fun trying to merge some other patches into it. The version that applies other stuff too does no longer apply to 6.1, sadly, so I'm working off the vanilla patch. I'll see where this takes me
EDIT: Forgot the most important thing. Thank you!
Last edited by mkaito (2013-02-24 16:00:06)
Fear me! I have root! Sometimes...
Offline
synorgy wrote:mkaito wrote:This would be a single set of tags shared among all screens.
http://dwm.suckless.org/patches/single_tagset
Like this?
It's a fairly intrusive patch, but there is the version that implements a bunch of other patches at the same time. Maybe this is what you want.This seems to do what I want indeed. Guess it'll be fun trying to merge some other patches into it. The version that applies other stuff too does no longer apply to 6.1, sadly, so I'm working off the vanilla patch. I'll see where this takes me
EDIT: Forgot the most important thing. Thank you!
I managed to get that rather intrusive patch to play nice with the things I needed to have in dwm. I've put the resulting stuff in a github repo.
Thanks again for pointing me at that patch! It only took me 5 hours of hair pulling to get it working I had fun, though, and it's rather cool to dive into the source code of your WM, and see how things are done.
Fear me! I have root! Sometimes...
Offline
Hi
I have a little problem with pertag2. When I applied pertag2, I have some errors of compilation. I have this dwm.c.
I don't if this is the right place to ask, tell me if I have to open a new topic.
Thanks !
Offline
Hi
I have a little problem with pertag2. When I applied pertag2, I have some errors of compilation. I have this dwm.c.
I don't if this is the right place to ask, tell me if I have to open a new topic.
Thanks !
dwm.c:456:9: error: request for member ‘name’ in something not a structure or union
Update your config. Namely, the tags array is no longer an array of *char, but an array of struct Tag.
dwm.c:2221:1: warning: ‘bstack’ defined but not used [-Wunused-function]
Add bstack to your layouts.
Fear me! I have root! Sometimes...
Offline
I'm an idiot... How can I still make that kind of mistakes haha.
But now I have another problem, no problems at the compilation, but when I use it I have this on my tags.
Thanks for your help.
Offline
You mean the fact that it's floating? Check my repo linked a post above yours, and check my config. You can set default layouts for each tag with pertag2.
Fear me! I have root! Sometimes...
Offline
Uhm I don't think the pertag2 patch touches the drawing functions... Are you sure that's not from another patch?
Fear me! I have root! Sometimes...
Offline
Yes I'm 100% sure, I don't have this problem with dwm before I applied this patch.
Offline
That's not the point. Patches are not self contained, they change stuff in dwm.c, which might affect things that you didn't think would be affected. I can't see a problem with the drawing functions in your linked dwm.c, so maybe someone else could go over them. And you could also link the pertag2.patch you used, so I can double check.
Fear me! I have root! Sometimes...
Offline
I've used this one.
I'm also using statuscolor and shorttitle. Without shorttitle the problem is still here, so maybe the problem is with statuscolor but a few users are using the both without problems.
Offline
Jokerboy's patch should be good, unless applied wrong. I suspect the issue to be in statuscolors, because pertag2 doesn't touch the bar (nor the text) wherewas statuscolors does.
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
OK thanks, I'll try tomorow to apply pertag2 first and I'll see.
It works ! I juste applied pertag2 first. Thanks for your help.
Last edited by Ichigo-Roku (2013-02-25 14:37:49)
Offline
Is there a recent version of the xbm layout icon patch?
Offline
What do you mean with recent?
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline