You are not logged in.

#1 2011-09-08 16:22:54

Fragasaurus
Member
From: Ottawa
Registered: 2010-05-20
Posts: 25

"Default" tag in DWM?

Firstly, forgive me, I'm not very good at C.
I'm looking through the dwm source code for wherever the default tag is set.

Basically I'd like to set all new windows that don't have a rule to open on a certain tag, rather than the current one.
Any ideas?

Thanks in advance.

Offline

#2 2011-09-08 16:37:05

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: "Default" tag in DWM?

In the manage() and applyrules() functions in dwm.c, modify the lines that set c->tags. Try it for yourself.

Edit: Probably just edit the last line of applyrules().

Last edited by lolilolicon (2011-09-08 16:40:23)


This silver ladybug at line 28...

Offline

#3 2011-09-08 17:02:57

Fragasaurus
Member
From: Ottawa
Registered: 2010-05-20
Posts: 25

Re: "Default" tag in DWM?

Oooo.  Thank you.

For anyone digging up this post in the future, the solution is as follows (as of DWM 5.9):

Replace the line
    c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : c->mon->tagset[c->mon->seltags];
with
    c->tags = c->tags & TAGMASK ? c->tags & TAGMASK :  TAGMASK_DEFAULT;

then define TAGMASK_DEFAULT in config.h.

Thanks, lolilolicon.

Offline

Board footer

Powered by FluxBB