You are not logged in.

#576 2012-01-26 17:46:16

Next7
Member
Registered: 2011-12-07
Posts: 38

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

I'm also interested in borderlessness in dwm: but I'm looking for possibility to draw particular window (namely Mplayer) with no borders. How to achieve this?

Offline

#577 2012-01-31 03:41:03

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

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

LordLandon wrote:

I've fixed the problem with useless gap - here is my patch. This is my first time in the dwm code, but the problem was tile() recalculating the height of a window after resizing it, and thus placing the next one right bellow.

I'm not sure if this breaks something else, but if it does, it might be better to alter the HEIGHT macro itself.

I've managed to get consistent height gaps but please for the love of god can anybody help remove double gaps on width as per http://ompldr.org/vY2pvZw - It's driving me insane, 2 years it's been fine consistent gaps then all of a sudden inconsistent, and why is height fine but width fubar? hmm

EDIT/ no matter, since I don't use nmaster (which is the culprit somehow) I just stripped all nmaster stuff away and used the old tile function, and it works!
http://ompldr.org/vY2sxYw

diff file -nmaster +uselessgaps +statuscolors http://codepad.org/9tVxrODt

Last edited by Meyithi (2012-01-31 19:18:08)


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

Offline

#578 2012-01-31 20:31:56

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

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

Guys, it is possible to center all the text in the status bar (as scrotwm for example)?
I have a huge space between the window name and the date. It could be good to gather tags, windows names, statusbar and have a more condensed infos.


Github -- My terminal font Envypn

Offline

#579 2012-01-31 21:57:43

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

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

Meyithi wrote:
LordLandon wrote:

I've fixed the problem with useless gap - here is my patch. This is my first time in the dwm code, but the problem was tile() recalculating the height of a window after resizing it, and thus placing the next one right bellow.

I'm not sure if this breaks something else, but if it does, it might be better to alter the HEIGHT macro itself.

I've managed to get consistent height gaps but please for the love of god can anybody help remove double gaps on width as per http://ompldr.org/vY2pvZw - It's driving me insane, 2 years it's been fine consistent gaps then all of a sudden inconsistent, and why is height fine but width fubar? hmm

EDIT/ no matter, since I don't use nmaster (which is the culprit somehow) I just stripped all nmaster stuff away and used the old tile function, and it works!
http://ompldr.org/vY2sxYw

diff file -nmaster +uselessgaps +statuscolors http://codepad.org/9tVxrODt

http://ompldr.org/vY2s2Mg/gaps.diff but it depends on pertag2 with bstack.. smile

dont forget to add

static const unsigned int gappx    = 4;        /* gap pixel between windows */

to your config.h

and make also the layouts part look like this:

 static const Layout layouts[] = {
	/* symbol     gaps       arrange function */
	{ "[T]",      True,      tile },        /* first entry is default */
	{ "[F]",      False,     NULL },        /* no layout function means floating behavior */
	{ "[M]",      False,     monocle },
	{ "[b]",      True,      bstack },
 };

have fun..

Offline

#580 2012-01-31 23:05:56

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

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

JokerBoy wrote:

have fun..

Thanks!  It's a strange user-case to choose a WM based on it's gaps but I am strange and proud of it.


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

Offline

#581 2012-02-01 03:28:35

lifeafter2am
Member
From: .........
Registered: 2009-06-10
Posts: 1,325
Website

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

So decided new year, new system, new WM! I've applied a few patches and so far I really like dwm. There is one thing that bothers me though, and that is how it handles dual screens. I've done some searching but come up short on answers. Is there a patch for having dwm handle dual screens more like XMonad, where a single tag shows on each screen, and both screens share 9 tags? I really don't need 18 tags ... and definitely need to move windows between tags/screens.

I saw this was asked in this thread back in 2010, but didn't see an answer. Sorry if this is like the most asked question or something. smile


#binarii @ irc.binarii.wtf
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#582 2012-02-01 04:44:37

cf8
Member
From: Russia
Registered: 2008-10-21
Posts: 83

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

2lifeafter2am
You can see how i've resolve this problem here: https://bitbucket.org/cf8/dwm/raw/feafb3446f6c/config.h
All i need is to "pin" tags to physical screens (first tag on screen0, the other on screen1), and here is what i've done:
Modify tagkeys like this:

#define TAGKEYS(KEY,TAG, MON) \
	{ MODKEY,           KEY,  focusmon, {.i = MON } }, \
	{ MODKEY|ShiftMask, KEY,  tagmon,   {.i = MON } }, \
	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

and hotkeys like this:

	TAGKEYS(                        XK_1,                      0, 0)
	TAGKEYS(                        XK_2,                      1, 1)

ah, and i've also aplied one patch from @guelfi for absolute monitor addressing

p.s mmm, its probably not what you've requested, but may be usefull for someone.

Last edited by cf8 (2012-02-01 04:47:04)

Offline

#583 2012-02-03 16:30:51

ivoarch
Member
From: the six feet under the ground
Registered: 2011-03-31
Posts: 436

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

Hi guys, i use Dwm whit external-bar and multimon-bar patches from https://bitbucket.org/djpohly/dwm-patches/src
the current patch assumes the output is going to dzen2, more info about this: https://bitbucket.org/djpohly/dwm-patch … README.rst


The problem is how to output this in dzen2 

void
drawbarnum(Monitor *m, unsigned int i) {
       unsigned int occ = 0, urg = 0;
        Client *c;
 
        for(c = m->clients; c; c = c->next) {
                occ |= c->tags;
                if(c->isurgent)
                        urg |= c->tags;
        }
       printf("%d\n", i);
        for(i = 0; i < LENGTH(tags); i++) {
                if(m->tagset[m->seltags] & 1 << i) {
                        printf("^fg(%s)^bg(%s)", normbgcolor, normfgcolor);
                       if(m == selmon && selmon->sel && selmon->sel->tags & 1 << i)
                               printf("(%s)^bg()^fg()", tags[i]);
                       else
                               printf(" %s ^bg()^fg()", tags[i]);
               } else if(occ & 1 << i) {
                       if(m == selmon && selmon->sel && selmon->sel->tags & 1 << i)
                               printf("(%s)", tags[i]);
                       else
                               printf(" %s ", tags[i]);
               }
	}
	printf(" %s ", m->ltsymbol);
       if(m->sel)
       printf("^fg(%s)^bg(%s) %s ^bg()^fg()", normbgcolor, normfgcolor, m->sel->name);
       printf("\n");
       fflush(stdout);
} 

I tried with this but not work for me

 #!/bin/bash

tee >(sed -un 'N;s/^0\n//p' | dzen2 -xs 1 "$@") | sed -un 'N;s/^1\n//p' | dzen2 -xs 2 "$@"

any idea?
anyone know another way to make it?
Thanks!!!

Last edited by ivoarch (2012-02-03 16:41:42)


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

Offline

#584 2012-02-04 17:06:43

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

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

This is for those who use a multi-monitor setup, and want to use different tagnames on different monitors. It depends on pertag2, so apply that first and then apply 02-multitags.patch (this is a temporary location, so in future it may be available on my bitbucket, or not).  The patch is hard coded so you'll have to use the same number of tags on all monitors, and if you want to change the numbers of tags, you'll have to change your config.h in something like this:

#define NUM_TAGS 9
static const Tag tags[][NUM_TAGS]

or simply

static const Tag tags[][9]

Have fun. smile

Offline

#585 2012-02-07 22:20:37

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

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

Could one of you guys give me a hint how I can define the height of dwm's bar? The bar wastes some pixels (2 pixels above the text, 1 pixel below), which I'd like to have for my terminals (I get one extra line with these 3 pixels, not much, but better than nothing). I looked into the sources, but I can't find the piece which defines the height of the bar. Must be in either drawbar or drawtext, right?

Offline

#586 2012-02-07 22:24:03

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

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

Function setup, bh = dc.h = dc.font.height + 2.

Offline

#587 2012-02-07 22:53:14

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

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

Ah crap, didn't see that, it's so obvious! Thanks JokerBoy!

Offline

#588 2012-02-08 01:14:29

fd
Member
Registered: 2011-05-27
Posts: 9

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

Hello Archers smile

Here is my first patch EVER tongue It adds a way of changing the height of the master top window . I searched a bit for a patch that did that for me, but I ended coding it myself.

http://codepad.org/0goNv1Wa

(also, you need to define mhfact and some bind to setmhfact in config.h)

edit: screenshots here http://imgur.com/a/cM23y#0

Last edited by fd (2012-02-09 02:15:37)

Offline

#589 2012-02-08 10:25:12

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

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

Could you provide screenshots to demonstrate what the patch really does?

Offline

#590 2012-02-08 11:37:30

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

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

Army wrote:

Could one of you guys give me a hint how I can define the height of dwm's bar? The bar wastes some pixels (2 pixels above the text, 1 pixel below), which I'd like to have for my terminals (I get one extra line with these 3 pixels, not much, but better than nothing). I looked into the sources, but I can't find the piece which defines the height of the bar. Must be in either drawbar or drawtext, right?

Also you can decrease internal border if you use urxvt:

urxvt.internalBorder:     1

Offline

#591 2012-02-08 16:14:47

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

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

I already have that set to zero. But thanks anyways for the hint!

Offline

#592 2012-02-08 21:48:12

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

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

JokerBoy wrote:

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 },
};

Holy crap! How did I miss this? This is awesome, the amount of windowed apps I use (games, emulators) I've had to drag to the centre, solved!
Thanks JokerBoy.


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

Offline

#593 2012-02-09 02:07:49

fd
Member
Registered: 2011-05-27
Posts: 9

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

Army wrote:

Could you provide screenshots to demonstrate what the patch really does?

Sure!

http://imgur.com/a/cM23y#0

Offline

#594 2012-02-09 10:15:31

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

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

Thanks! Now I get it! Pretty nice, I think I'll include into my patchset.

I again need a hint:
Where do I find the code pieces in dwm.c, which define, that floating clients are always on top? I don't like that, because this way it's impossible to use floating clients together with tiled clients with the same tag.

Offline

#595 2012-02-09 13:23:21

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

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

Why is it impossibe?  Just untag the floating client when it's not needed.

Offline

#596 2012-02-09 14:13:52

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

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

I could do that, but it's really not very handy..

Offline

#597 2012-02-09 15:09:29

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

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

On a sidenote, I think the default keybindings for 'view' and 'toggleview' in dwm are backwards.  I can't believe this is how it's intended to be (and I've been using dwm for 4+ years!).  Pulling tags in and sending them out is far more useful than going to one, separate tag.  Switching these bindings makes dwm much more enjoyable, IMO.

Offline

#598 2012-02-09 17:43:16

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

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

Meyithi wrote:

Holy crap! How did I miss this? This is awesome, the amount of windowed apps I use (games, emulators) I've had to drag to the centre, solved!
Thanks JokerBoy.

My pleasure. smile

fd - Nice idea @ mhfact.. smile

Offline

#599 2012-02-09 18:11:21

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,322
Website

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

steve___ wrote:

On a sidenote, I think the default keybindings for 'view' and 'toggleview' in dwm are backwards.  I can't believe this is how it's intended to be (and I've been using dwm for 4+ years!).  Pulling tags in and sending them out is far more useful than going to one, separate tag.  Switching these bindings makes dwm much more enjoyable, IMO.

Agreed. If toggleview pulled the tag to master by default, it would be even better...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#600 2012-02-09 20:14:34

fd
Member
Registered: 2011-05-27
Posts: 9

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

Army wrote:

Thanks! Now I get it! Pretty nice, I think I'll include into my patchset.

JokerBoy wrote:

fd - Nice idea @ mhfact.. smile

I'm glad you liked it smile

There is room for improvements, setmhfact() and setmfact() should be the same function with an argument for modifying the width or height instead of being the same copypasted function haha, I was lazy

steve___ wrote:

On a sidenote, I think the default keybindings for 'view' and 'toggleview' in dwm are backwards.  I can't believe this is how it's intended to be (and I've been using dwm for 4+ years!).  Pulling tags in and sending them out is far more useful than going to one, separate tag.  Switching these bindings makes dwm much more enjoyable, IMO.

Cool! Swapped that bindings, I think its better too.

Also, it emphatizes more that tags are not workspaces (unless pertag)

Last edited by fd (2012-02-09 20:15:45)

Offline

Board footer

Powered by FluxBB