You are not logged in.

#1076 2013-02-22 17:32:02

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: DWM Hackers Unite! Share (or request) dwm patches.

@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

#1077 2013-02-22 17:34:54

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

Re: DWM Hackers Unite! Share (or request) dwm patches.

Procyon wrote:

@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

#1078 2013-02-22 17:35:00

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

pks wrote:

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)


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#1079 2013-02-23 08:40:14

andmars
Member
Registered: 2012-03-13
Posts: 362

Re: DWM Hackers Unite! Share (or request) dwm patches.

kuraku wrote:

Is there a patch that can make dwm to overlap borders of clients in tile mode?

Pranavg1890 wrote:

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

#1080 2013-02-23 12:43:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1081 2013-02-23 12:54:32

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Trilby wrote:

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.

http://ompldr.org/vaGs3cA

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.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#1082 2013-02-23 13:40:20

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Trilby wrote:

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

#1083 2013-02-24 06:01:09

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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 tongue 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

#1084 2013-02-24 06:53:32

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1085 2013-02-24 14:18:12

synorgy
Member
From: $HOME
Registered: 2005-07-11
Posts: 272
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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.


"Unix is basically a simple operating system, but you have to be a genius to understand the simplicity." (Dennis Ritchie)

Offline

#1086 2013-02-24 15:59:42

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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 smile

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

#1087 2013-02-24 19:28:01

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

mkaito wrote:
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 smile

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 big_smile 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

#1088 2013-02-24 20:32:11

Ichigo-Roku
Member
Registered: 2012-01-15
Posts: 35

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1089 2013-02-24 20:35:33

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Ichigo-Roku wrote:

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

#1090 2013-02-24 21:10:30

Ichigo-Roku
Member
Registered: 2012-01-15
Posts: 35

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1091 2013-02-24 21:18:48

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1092 2013-02-24 21:36:26

Ichigo-Roku
Member
Registered: 2012-01-15
Posts: 35

Re: DWM Hackers Unite! Share (or request) dwm patches.

I'm talking about the tags, there's a screen before and after I applied the patch.

Offline

#1093 2013-02-24 21:43:02

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1094 2013-02-24 21:46:15

Ichigo-Roku
Member
Registered: 2012-01-15
Posts: 35

Re: DWM Hackers Unite! Share (or request) dwm patches.

Yes I'm 100% sure, I don't have this problem with dwm before I applied this patch.

Offline

#1095 2013-02-24 21:50:05

mkaito
Member
From: Spain
Registered: 2010-06-12
Posts: 126
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1096 2013-02-24 22:07:55

Ichigo-Roku
Member
Registered: 2012-01-15
Posts: 35

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1097 2013-02-24 22:19:40

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1098 2013-02-24 22:30:53

Ichigo-Roku
Member
Registered: 2012-01-15
Posts: 35

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

#1099 2013-02-25 17:53:58

inch
Member
Registered: 2010-12-21
Posts: 49

Re: DWM Hackers Unite! Share (or request) dwm patches.

Is there a recent version of the xbm layout icon patch?

Offline

#1100 2013-02-25 17:55:11

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

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

Board footer

Powered by FluxBB