You are not logged in.

#201 2011-05-25 14:09:56

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

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

Offline

#202 2011-05-25 18:57:02

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

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

Thanks for the tip. I've already tried that patch but it doesn't seem to work (link is broken) and formatting is off when I try to copy/paste that text into a text file.

Offline

#203 2011-05-25 19:11:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

This worked in (much) older versions - untested in 5.8.2: in dwm.c  at 1822

m->mh = m->wh = unique[i].height - BOTTOM_BAR_HEIGHT;

and in your config.h

#define BOTTOM_BAR_HEIGHT 18

# edit wrong line number...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#204 2011-05-26 14:51:51

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

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

jasonwryan wrote:

This worked in (much) older versions - untested in 5.8.2: in dwm.c  at 1822

m->mh = m->wh = unique[i].height - BOTTOM_BAR_HEIGHT;

and in your config.h

#define BOTTOM_BAR_HEIGHT 18

# edit wrong line number...

Thanks for the tip, also your trick really works smile

"m->mh = m->wh = unique[i].height;" is now located at "2213" so by changing it into "m->mh = m->wh = unique[i].height - BOTTOM_BAR_HEIGHT;" makes your dreams come true

Here's the pic :
tOHN6OQ
I used a dirty trick to make conky not to move, I added 15px border to my wallpaper and used "own_window no setting" At least it's working!

EDIT1: Confirmed working with dwm-5.8.2, I'll add a picture later.
EDIT2: Picture added.

Last edited by Shinryuu (2011-05-26 15:44:31)

Offline

#205 2011-05-27 16:21:44

nixfag
Member
From: Romania
Registered: 2011-03-03
Posts: 73

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

I've just modified this part in my dwm.c to get a gap for the system tray and dzen2 bar:

void
updatebarpos(Monitor *m) {
    m->wy = m->my;
    m->wh = m->mh ;
    if(m->showbar) {
        m->wh -= bh;
        m->by = m->topbar ? m->wy : m->wy + m->wh;
        m->wy = m->topbar ? m->wy + bh : m->wy;
    }
    else
        m->by = -bh;
}

With

m->wh = m->mh - BOTTOM_GAP;

Of course BOTTOM_GAP defined in my config.h and it works pretty good.

Offline

#206 2011-05-27 16:44:45

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

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

this patch looks better. define marginbottom in your config.h.

Last edited by JokerBoy (2011-05-27 16:45:58)

Offline

#207 2011-06-09 16:02:53

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

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

How do i patch DWM?


I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

#208 2011-06-09 16:06:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

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

Offline

#209 2011-06-09 21:01:21

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

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

and after patching the package isn`t compiling
this is my terminal output on make

 ~/.dwm/dwm-5.8.2 > make
dwm build options:
CFLAGS   = -g -std=c99 -pedantic -Wall -O0 -I. -I/usr/include -I/usr/X11R6/include -DVERSION="5.8.2" -DXINERAMA
LDFLAGS  = -g -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama
CC       = cc
CC dwm.c
In file included from config.h:25:0,
                 from dwm.c:265:
bstack.c: In function ‘bstack’:
bstack.c:7:28: error: dereferencing pointer to incomplete type
bstack.c:11:17: error: dereferencing pointer to incomplete type
bstack.c:12:8: error: dereferencing pointer to incomplete type
bstack.c:12:19: error: dereferencing pointer to incomplete type
bstack.c:13:13: error: dereferencing pointer to incomplete type
bstack.c:13:20: error: dereferencing pointer to incomplete type
bstack.c:13:27: error: dereferencing pointer to incomplete type
bstack.c:13:56: error: dereferencing pointer to incomplete type
bstack.c:17:7: error: dereferencing pointer to incomplete type
bstack.c:18:8: error: dereferencing pointer to incomplete type
bstack.c:18:62: error: dereferencing pointer to incomplete type
bstack.c:19:7: error: dereferencing pointer to incomplete type
bstack.c:20:8: error: dereferencing pointer to incomplete type
bstack.c:20:36: error: dereferencing pointer to incomplete type
bstack.c:20:44: error: dereferencing pointer to incomplete type
bstack.c:20:56: error: dereferencing pointer to incomplete type
bstack.c:22:8: error: dereferencing pointer to incomplete type
bstack.c:25:13: error: dereferencing pointer to incomplete type
bstack.c:25:21: error: dereferencing pointer to incomplete type
bstack.c:26:12: error: dereferencing pointer to incomplete type
In file included from dwm.c:292:0:
bstack.c: At top level:
bstack.c:2:1: error: redefinition of ‘bstack’
bstack.c:2:1: note: previous definition of ‘bstack’ was here
dwm.c: In function ‘initfont’:
dwm.c:1026:20: warning: variable ‘font_extents’ set but not used [-Wunused-but-set-variable]
dwm.c: At top level:
dwm.c:142:13: warning: ‘bstackhoriz’ declared ‘static’ but never defined [-Wunused-function]
bstack.c:2:1: warning: ‘bstack’ defined but not used [-Wunused-function]
make: *** [dwm.o] Error 1
 ~/.dwm/dwm-5.8.2 > 
 

I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

#210 2011-06-09 21:08:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

In addition to the error, it would be helpful if you described exactly what you did as you applied the patch. Are you sure you updated your config.h?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#211 2011-06-09 21:12:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

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

Can you post how did you apply the patch?

[karol@black dwm-5.8.2]$ patch -p1 < dwm-5.8.2-bstack.diff 
patching file bstack.c
patching file bstackhoriz.c
patching file config.def.h
[karol@black dwm-5.8.2]$ make
dwm build options:
CFLAGS   = -g -std=c99 -pedantic -Wall -O0 -I. -I/usr/include -I/usr/X11R6/include -DVERSION="5.8.2" -DXINERAMA
LDFLAGS  = -g -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama
CC       = cc
creating config.h from config.def.h
CC dwm.c
dwm.c: In function ‘initfont’:
dwm.c:1003:20: warning: variable ‘font_extents’ set but not used [-Wunused-but-set-variable]
CC -o dwm

There are two versions of bstack: one to use w/ pertag, the other one to use w/o pertag.

Offline

#212 2011-06-09 21:21:27

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

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

i downloaded bstack,pertag and fibonacci from suckless and saved in may dwm config folder.then i cd into it and runed the patch with patch < dwm-5.8.2-bstack.diff , patch < dwm-5.8.2-pertag.dff , patch < dwm-5.8.2-fibonacci.dff  and after that i edited my dwm.c & config.h  and tried to recompile
here is my config.h http://pastebin.com/ukGJ59HM and dwm.c http://pastebin.com/89QZ9MW7


I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

#213 2011-06-09 21:24:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

You have to setlayouts in your keys section for the additional layouts you specify in layouts...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#214 2011-06-10 12:51:11

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

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

lutherus wrote:

i downloaded bstack,pertag and fibonacci from suckless and saved in may dwm config folder.then i cd into it and runed the patch with patch < dwm-5.8.2-bstack.diff , patch < dwm-5.8.2-pertag.dff , patch < dwm-5.8.2-fibonacci.dff  and after that i edited my dwm.c & config.h  and tried to recompile
here is my config.h http://pastebin.com/ukGJ59HM and dwm.c http://pastebin.com/89QZ9MW7

As karol said, you'll need to use dwm-5.8.2-bstack-alt.diff with pertag. And if i'm correct, then you have to apply pertag first and then bstack-alt.

Offline

#215 2011-06-10 12:59:32

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

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

I patched it.Thx for help.But i have only 2 layouts.Dwm compiles without errors but i have only 2 layouts and in my config.h are 4


I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

#216 2011-06-10 13:17:15

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

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

Please post your config.h again.

Offline

#217 2011-06-10 13:24:28

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

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

from a few pages back:

jasonwryan wrote:

this thread is to share patches and tips, not a drop-off repair and clean service. If randomuser wants to show some intiative and attempt to learn dwm, then fine - otherwise please do not spoon feed him.

Offline

#218 2011-06-10 15:55:01

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

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

@x33a
here you go http://pastebin.com/JHnS9hvN
i have the first 2 layouts.


I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

#219 2011-06-11 07:09:09

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

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

lutherus wrote:

@x33a
here you go http://pastebin.com/JHnS9hvN
i have the first 2 layouts.

From what i can see, you'll have to define new keys for the other 2 layouts.

JokerBoy wrote:

from a few pages back:

jasonwryan wrote:

this thread is to share patches and tips, not a drop-off repair and clean service. If randomuser wants to show some intiative and attempt to learn dwm, then fine - otherwise please do not spoon feed him.

I know that, and i agree with that. I suppose guiding someone doesn't count as spoon feeding. I remember having a lot of difficulty starting out with dwm, but the great community here including jason and yourself helped me out. Heck, even today applying new patches to dwm can be intimidating.

Cheers.

Offline

#220 2011-06-11 13:55:52

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

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

I really wanted a clickable bar in dwm (for clicking windows), but I found the fancycoloredbarclickable patch too complicated, so I merged fancybar with fancycoloredbarclickable to create fancybarclickable. I find the fancybar part especially useful when using surf, and the clickable part indispensable when in tablet mode on my tablet PC. Posting it here in case anyone is interested.

http://pastebin.com/raw.php?i=1Fzj5J4x

This patches against vanilla dwm 5.8.2.

The original patches (fancycoloredbarclickable and fancybar) are available at suckless.org.

I've also updated tilemovemouse for dwm 5.8.2 (it was last updated for dwm 5.3 I think), which just amounted to adding in the multiple monitors code. It allows you to move tiled windows by dragging them while holding the mod key and works with any tiling layout. To use, add

#include "tilemovemouse.c"

in your config.h before your mousebindings, and add a mouse binding using it. For instance, I chose to replace the mouse binding for movemouse with tilemovemouse.

http://pastebin.com/raw.php?i=zxByfMG2

Last edited by Sara (2011-06-11 22:42:40)


Registed Linux User 483618

Offline

#221 2011-06-14 23:47:48

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

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

thanks for tilemovemouse one, will be usefull for me

Offline

#222 2011-06-22 16:14:27

Gooru
Member
From: Poland
Registered: 2010-08-25
Posts: 53

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

I have strange problem with statusbar, after changing font the zero from battery state suddenly disappeared. Here is screenshot with tested command:
http://dl.dropbox.com/u/4446135/2011-06 … _scrot.png
Any ideas?

EDIT: Sry for the size of screenshot, it's bigger now. I was not aware it's unreadable.

EDIT: I fixed it, don't know why, but deleting statuscolor specific characters (\x01) helped. It was really strange bug, because with the other font it was displaying normally. I'm still wondering what could cause such a strange behaviour. I'd like to read what do you guys think wink

Last edited by Gooru (2011-06-23 16:46:29)

Offline

#223 2011-06-22 18:06:55

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

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

you might want to make that screenshot bigger/more readable

Offline

#224 2011-06-23 15:22:41

portix
Member
Registered: 2009-01-13
Posts: 757

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

I just created a simple patch i want to share, that places windows in floating mode a bit different. I don't know if there exists already a similar patch. It looks like this:
tOTcxMA
The patch:

diff -u dwm-5.8.2.orig//dwm.c dwm-5.8.2/dwm.c
--- dwm-5.8.2.orig//dwm.c    2011-06-23 15:54:41.000000000 +0200
+++ dwm-5.8.2/dwm.c    2011-06-23 16:51:24.000000000 +0200
@@ -140,6 +140,7 @@
     Monitor *next;
     Window barwin;
     const Layout *lt[2];
+ int ox, oy;
 };
 
 typedef struct {
@@ -1127,6 +1128,10 @@
         c->bw = 0;
     }
     else {
+        if (!c->mon->lt[c->mon->sellt]->arrange) {
+            c->x = c->mon->ox;
+            c->y = c->mon->oy;
+        }
         if(c->x + WIDTH(c) > c->mon->mx + c->mon->mw)
             c->x = c->mon->mx + c->mon->mw - WIDTH(c);
         if(c->y + HEIGHT(c) > c->mon->my + c->mon->mh)
@@ -1135,6 +1140,10 @@
         /* only fix client y-offset, if the client center might cover the bar */
         c->y = MAX(c->y, ((c->mon->by == 0) && (c->x + (c->w / 2) >= c->mon->wx)
                    && (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
+        if (!c->mon->lt[c->mon->sellt]->arrange) {
+            c->mon->ox = (c->x + offsetx) % (c->mon->ww - WIDTH(c));
+            c->mon->oy = (c->y + offsety) % (c->mon->wh - HEIGHT(c));
+        }
         c->bw = borderpx;
     }
     wc.border_width = c->bw;

And

static const int offsetx = 64;
static const int offsety = 40;

must be defined in config.h.

Offline

#225 2011-06-24 14:20:06

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

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

I applied the gestures patch to my dwm, and it patched successfully, but I am unsure how to use it. Here is the mousebinding I used to activate it:

{ ClkWinTitle,          0,              Button3,        startgesture,   {0} },

Here is the command for the gesture I am trying to execute

{"d", spawn, SHCMD("easystroke send disable") },

which is a gesture to toggle my other gesture software (for if I disable easystroke using an easystroke gesture, I can't turn it back on, except if I run `easystroke send disable` from the commandline). In any case, the command itself is immaterial, because I tried testing with an ordinary command, such as `xournal` to spawn Xournal, and nothing happened. What I did was after right-clicking the window title, still holding the right-click (Button3), I wrote the letter "d", lowercase, with my mouse. I've tried changing this line to use other letters and then re-compiling and trying to gesture again, to no avail.

I know something is happening because when I right-click the window title, the mouse changes, which doesn't occur with stock dwm. I thought perhaps I had another patch that interfered, but applying this patch on stock dwm gave the same result. I've concluded I must be doing the mouse gesture wrong, and would appreciate some advice. Thanks.

Also, this patch should work because a person mentioned his usage of it in the dwm mailing list.

Last edited by Sara (2011-06-24 14:26:45)


Registed Linux User 483618

Offline

Board footer

Powered by FluxBB