You are not logged in.

#551 2012-01-20 19:34:24

ivoarch
Member
Registered: 2011-03-31
Posts: 436

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

centred-floating a bit different as this patch https://bbs.archlinux.org/viewtopic.php … 37#p952637 be better. roll


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#552 2012-01-20 20:06:42

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

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

OK100 - ok, iscentred added to rules.

patch: http://hg.punctweb.ro/dwm/src/0da6d857f … ating.diff

example to ignore gimp:

static const Rule rules[] = {
	/* class          instance     title       tags mask     isfloating   iscentred   monitor */
	{ "Gimp",         NULL,        NULL,       0,            True,        False,      -1 },
};

Last edited by JokerBoy (2012-01-21 09:14:28)

Offline

#553 2012-01-20 20:27:55

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

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

Awesome! Thank you.

Offline

#554 2012-01-21 10:48:24

Ypnose
Member
From: Jailed in the shell
Registered: 2011-04-21
Posts: 353
Website

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

Since I am an addicted user of centred-floating patch, I'll apply it. Great change especially for GIMP.

EDIT: Congratulations Jokerboy, it's really good.

Last edited by Ypnose (2012-01-21 10:56:24)


Github -- My terminal font Envypn

Offline

#555 2012-01-22 16:58:01

mjheagle8
Member
From: /home/mjheagle8
Registered: 2009-07-12
Posts: 186

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

JokerBoy wrote:
mjheagle8 wrote:

hey all,

i'm working on a patch to show my root window title on all monitors. does this already exist and i've missed it?

anyways, what i have so far cuts the text (adds the ...) on my larger monitor when the smaller monitor is active.  i'm having some trouble locating the source of this.  can anyone give me any help? 

thanks in advance for any help/advice!

Here's my solution for your problem (apply patch by hand):

 static Monitor *dirtomon(int dir);
 static void drawbar(Monitor *m);
 static void drawbars(void);
-static void drawcoloredtext(char *text);
+static void drawcoloredtext(Monitor *m, char *text);
 static void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]);
 static void drawtext(const char *text, unsigned long col[ColLast], Bool pad);
 static void enternotify(XEvent *e);
...
 			dc.x = x;
 			dc.w = m->ww - x;
 		}
-		drawcoloredtext(stext);
+		drawcoloredtext(m, stext);
 	}
 	else
 		dc.x = m->ww;
...
}
 
 void
-drawcoloredtext(char *text) {
+drawcoloredtext(Monitor *m, char *text) {
 	char *buf = text, *ptr = buf, c = 1;
 	unsigned long *col = dc.colors[0];
 	int i, ox = dc.x;
...
 		c=*ptr;
 		*ptr=0;
 		if(i) {
-			dc.w = selmon->ww - dc.x;
+			dc.w = m->ww - dc.x;
 			drawtext(buf, col, False);
 			dc.x += textnw(buf, i);

kaptenen - Thanks for the feedback. smile

that worked perfectly! thanks!


Desktop/Laptop - DWM :: VM - screen
Registered Linux User Number 483137 :: Victory! :: GitHub

Offline

#556 2012-01-23 01:31:55

echo.unity
Member
Registered: 2011-11-14
Posts: 68

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

does anyone know where I can locate the hints patch for URxvt? dwm 6

Offline

#557 2012-01-23 06:10:02

ivoarch
Member
Registered: 2011-03-31
Posts: 436

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

@echo.unity
I'm not sure but then try this https://aur.archlinux.org/packages.php?ID=44649
or you can put in config.h

static const Bool resizehints = False;/* True means respect size hints in tiled resizals */ 

Last edited by ivoarch (2012-01-23 18:14:33)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#558 2012-01-23 07:36:23

echo.unity
Member
Registered: 2011-11-14
Posts: 68

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

ivoarch wrote:

@echo.unity
I'm not sure but then try this https://aur.archlinux.org/packages.php?ID=44649
or you can put in config.h

tatic const Bool resizehints = False;/* True means respect size hints in tiled resizals */ 

Thanks i'll try the latter, when the wiki stated hints patch for urxvt - I actually thought it was referring to a patch.

Offline

#559 2012-01-23 12:32:42

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

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

echo.unity wrote:
ivoarch wrote:

@echo.unity
I'm not sure but then try this https://aur.archlinux.org/packages.php?ID=44649
or you can put in config.h

tatic const Bool resizehints = False;/* True means respect size hints in tiled resizals */ 

Thanks i'll try the latter, when the wiki stated hints patch for urxvt - I actually thought it was referring to a patch.

The patched version for urxvt use a patch called font-width-fix.patch.

Offline

#560 2012-01-23 21:26:21

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

Army wrote:

Does one of you guys know, how to make dwm use no borders, if there's only one window per tag (in any layout)? A border isn't needed at all in this case, would be nice imho.

Thanks!

I can hardly believe it myself, but seems like I actually hacked a patch!! I'm so proud! big_smile
If there's only one client per tag, the border isn't visible. For monocle, there are no borders at all. Works best, if resizehints is set to False, if it's set to True terminals might show a bottom border.
http://codepad.org/vCUurUU9
But please, if there's something incredibly stupid in this, tell me!

It's based on Jokerboy's monocle_no_borders patch, which contains this new resize calculation.

Last edited by Army (2012-01-23 21:38:25)

Offline

#561 2012-01-23 22:03:32

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

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

http://codepad.org/ONzzhuna

Here's an another solution. It works ok, but I don't like it. hmm

EDIT: btw, it's based on your idea, so kudos to you. tongue

Last edited by JokerBoy (2012-01-23 22:20:19)

Offline

#562 2012-01-23 22:37:04

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

Thanks JokerBoy! It was great fun to hack without even knowing what I'm doing. Dwm broke many times *lol*. I'm sure your patch works better, I'll use it right away!

Why don't you like it? The idea itself or your code? I like it, because it really removes borders. Nice!

Offline

#563 2012-01-23 22:44:41

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

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

Both.. Regarding the code, it's a start so it can improve over time. I already have in mind something else in mind, but ATM it's too late. Regarding the idea, I can get used to it over time.

PS: don't forget to name that patch. smile

Offline

#564 2012-01-23 23:07:40

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

Right now mine is called 05-dwm-6.0-one_client_borderless+monocle_always_borderless.patch hmm (I like your naming scheme, so I adopted it)

I looked into your repo, so you changed your monocle_no_borders a lot, almost like this one. How can I combine both?

Last edited by Army (2012-01-23 23:08:15)

Offline

#565 2012-01-24 00:01:05

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

I'm on fire big_smile I just thought, why not fix something I really don't like about dwm: That its fullscreen windows are floating. I just don't like this, because if I change clients, I still see the fullscreen window and lose track of what is focused right now! I like it much more the way it's implemented in monsterwm. So I tried something, but it has one problem: When the bar is visible and I switch clients, the bar appears and only disappears, when I toggle the fullscreen mode. So I'd like it to hide the bar as soon as a client goes fullscreen and show it again after the fullscreen mode is quit. But what if the bar was hidden in the first place? Or what if the fullscreen window is being moved to another monitor? Right now that's no problem for me, since I always want to see the bar and don't have a second monitor.
I see now, this fullscreen -> floating thing makes things much easier, but well, I still just don't like this!

Here's how far I got so far, comments and help is highly appreciated!

Last edited by Army (2012-01-24 00:02:10)

Offline

#566 2012-01-24 01:50:31

kuraku
Member
Registered: 2012-01-03
Posts: 202

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

kuraku wrote:

I'm not sure if this is the right place but i will try my luck:
is there any way to make selected window "master" comparing to next? In monsterwm i'm able to open next window after selected one (usualy selected one is master).

By default in dwm, selected master is being pushed outised master area and that is not so practical hmm

Okay, i managed to explain this in a better way (i think):

If you used monsterwm, you noticed that it places newly created clients at the end of the list of windows. So, client that is started on empty screen will be always in master and every after it will go to "slave" (call it however you want) next to each other in this simple order: 1:2:3:4:5...:n (where "1" is first created client, "2" is second, "3" is third etc). At the moment, dwm sorts clients in reverse order (compared to what i need).

I know that there are attachaside and similar patches but they do not affect every client in the list but just master and first client under it. Is there any way to do what i want in dwm?

p.s. I'm not expirienced with C at all. It is worth to say that.

Offline

#567 2012-01-24 02:10:23

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

What you want is something like attachaside, more like attachend. Take a look at this, it's not exactly what you want and I tested it, it doesn't behave the way it's described. But maybe someone can tweak it so the new client goes to the end of the list all the time.

Offline

#568 2012-01-24 03:14:54

steve___
Member
Registered: 2008-02-24
Posts: 452

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

With 6.0 I'm starting to use nmaster more with my browser tag but the finger gymnastics are a pain.

I'd like to create a key binding in config.h to a function that selects tag 3 and incnmaster +1.  If tag 3 is set then do the opposite -- unselect tag 3 and incnamaster -1.  Any direction would be appreciated.

Last edited by steve___ (2012-01-24 03:16:11)

Offline

#569 2012-01-24 08:48:26

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

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

Army wrote:

Right now mine is called 05-dwm-6.0-one_client_borderless+monocle_always_borderless.patch hmm (I like your naming scheme, so I adopted it)

one_client_borderless should be more than ok.. tongue

Army wrote:

I looked into your repo, so you changed your monocle_no_borders a lot, almost like this one. How can I combine both?

Yes, 'cause the previous one doesn't perform very well on a multi-monitor setup. smile You can make multiple checks.. But I want to try a different way to do this other than counting the clients.. Now I'm at work, so I'll look into this later this day. smile

Offline

#570 2012-01-24 17:31:58

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

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

And here's my resizeclient function for one_client_borderless:

void
resizeclient(Client *c, int x, int y, int w, int h) {
	XWindowChanges wc;

	c->oldx = c->x; c->x = wc.x = x;
	c->oldy = c->y; c->y = wc.y = y;
	c->oldw = c->w; c->w = wc.width = w;
	c->oldh = c->h; c->h = wc.height = h;
	if(selmon->wx == c->x && selmon->wy == c->y && selmon->ww - 2 * c->bw == c->w && selmon->wh - 2 * c->bw == c->h && !c->isfloating && !c->isfullscreen) {
		wc.border_width = 0;
		c->w = wc.width += c->bw * 2;
		c->h = wc.height += c->bw * 2;
	}
	else 
		wc.border_width = c->bw;
	XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
	configure(c);
	XSync(dpy, False);
}

It works, but I don't like it.. lol..

Last edited by JokerBoy (2012-01-24 19:08:14)

Offline

#571 2012-01-24 19:00:45

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

It doesn't work if resizehints is set to False wink

Offline

#572 2012-01-24 19:07:44

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

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

I'm using also resizehints = false and it works... Maybe counting the clients it's a better way, but some layouts like pidgin-grid are made to keep one small window on a side so in this case it won't work that well...

Offline

#573 2012-01-24 19:28:17

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

Damn, I meant resizehints = True

Last edited by Army (2012-01-24 19:29:12)

Offline

#574 2012-01-24 20:09:14

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

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

You can use this, but on a multi-monitor you'll see one "missing" border on the unfocused monitor.

Offline

#575 2012-01-25 09:23:53

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

Damn, you're right, I didn't think of that! Well, I'll see how I do it.

Offline

Board footer

Powered by FluxBB