You are not logged in.

#251 2015-11-16 15:53:33

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 160
Website

Re: The dwm thread

Fuxino wrote:

You should add the declaration of those variables in the config.h file. Just add these lines among the others variables at the beginning of the file:

static const unsigned int systraypinning = 0;   /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayspacing = 2;   /* systray spacing */
static const int systraypinningfailfirst = 1;   /* 1: if pinning fails, display systray on the first monitor, 0: display systray o    n the last monitor*/
static const int showsystray        = 1;        /* 0 means no systray */

I think the problem is that the patch modifies the config.def.h file, but when building the package from ABS the config.h file in the package directory is used instead, and that doesn't contain the variables needed. smile

That fixed it...awesome....thanks...the thing is though, I tried to install from source manually (from the suckless website) but I got the same errors. I think it's just not adding the right variables period. I never had a problem patching 6.0 from the pkgbuild file. I'm not sure how to let the developer know about this. 

I think later today, I'll try to add a couple more patches (additional layouts and such) and see if they work ok. Then we'll know if it's just that one patch.


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#252 2015-11-16 16:17:23

Fuxino
Member
From: Slovakia
Registered: 2014-09-26
Posts: 167

Re: The dwm thread

wchouser3 wrote:

That fixed it...awesome....thanks...

You're welcome smile

the thing is though, I tried to install from source manually (from the suckless website) but I got the same errors. I think it's just not adding the right variables period. I never had a problem patching 6.0 from the pkgbuild file. I'm not sure how to let the developer know about this.

I tried it now and it builds just fine for me.

I think later today, I'll try to add a couple more patches (additional layouts and such) and see if they work ok. Then we'll know if it's just that one patch.

Keep in mind that each patch will work with the vanilla source, but it will probably fail if you apply it after you applied another patch already, so if you want to use additional patches you'll have to do it by hand.

Offline

#253 2015-11-17 18:46:28

sekret
Member
Registered: 2013-07-22
Posts: 283

Re: The dwm thread

I need some advice for the patch hide_vacant_tags.

With dwm 6.0 my patch looked like this

diff -paur dwm-6.0.old/dwm.c dwm-6.0.new/dwm.c
--- dwm-6.0.old/dwm.c	2011-12-19 16:02:46.000000000 +0100
+++ dwm-6.0.new/dwm.c	2014-05-17 08:49:50.690845038 +0200
@@ -178,7 +178,6 @@ static void die(const char *errstr, ...)
 static Monitor *dirtomon(int dir);
 static void drawbar(Monitor *m);
 static void drawbars(void);
-static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
 static void drawtext(const char *text, unsigned long col[ColLast], Bool invert);
 static void enternotify(XEvent *e);
 static void expose(XEvent *e);
@@ -425,7 +424,7 @@ attachstack(Client *c) {
 
 void
 buttonpress(XEvent *e) {
-	unsigned int i, x, click;
+	unsigned int i, x, click, occ = 0;
 	Arg arg = {0};
 	Client *c;
 	Monitor *m;
@@ -439,10 +438,14 @@ buttonpress(XEvent *e) {
 		focus(NULL);
 	}
 	if(ev->window == selmon->barwin) {
+  for(c = m->clients; c; c = c->next)
+   occ |= c->tags;
 		i = x = 0;
-		do
+		do {
+   if (!(m->tagset[m->seltags] & 1 << i) && !(occ & 1 << i))
+    continue;
 			x += TEXTW(tags[i]);
-		while(ev->x >= x && ++i < LENGTH(tags));
+		} while(ev->x >= x && ++i < LENGTH(tags));
 		if(i < LENGTH(tags)) {
 			click = ClkTagBar;
 			arg.ui = 1 << i;
@@ -729,11 +732,11 @@ drawbar(Monitor *m) {
 	}
 	dc.x = 0;
 	for(i = 0; i < LENGTH(tags); i++) {
+		if (!(m->tagset[m->seltags] & 1 << i) && !(occ & 1 << i))
+		continue;
 		dc.w = TEXTW(tags[i]);
 		col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
 		drawtext(tags[i], col, urg & 1 << i);
-		drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
-		           occ & 1 << i, urg & 1 << i, col);
 		dc.x += dc.w;
 	}
 	dc.w = blw = TEXTW(m->ltsymbol);
@@ -756,7 +759,6 @@ drawbar(Monitor *m) {
 		if(m->sel) {
 			col = m == selmon ? dc.sel : dc.norm;
 			drawtext(m->sel->name, col, False);
-			drawsquare(m->sel->isfixed, m->sel->isfloating, False, col);
 		}
 		else
 			drawtext(NULL, dc.norm, False);
@@ -774,18 +776,6 @@ drawbars(void) {
 }
 
 void
-drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]) {
-	int x;
-
-	XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
-	x = (dc.font.ascent + dc.font.descent + 2) / 4;
-	if(filled)
-		XFillRectangle(dpy, dc.drawable, dc.gc, dc.x+1, dc.y+1, x+1, x+1);
-	else if(empty)
-		XDrawRectangle(dpy, dc.drawable, dc.gc, dc.x+1, dc.y+1, x, x);
-}
-
-void
 drawtext(const char *text, unsigned long col[ColLast], Bool invert) {
 	char buf[256];
 	int i, x, y, h, len, olen;

The difference is quite huge! It's caused by xft now being supported, right?

Well the patch for 6.0 also removed the square indicating that a tag is being used. This isn't required when using this patch, because only used tags actually show. But I can't get rid of this square anymore with 6.1.

Since I'm no coder this seems too difficult for me. It's actually no real biggie, the patch works fine, the status bar is ok, also on my multi monitor setup. But if one of you guys uses this patch and knows how to get rid of the square, please share it! smile

Offline

#254 2015-12-13 14:31:03

Henkm
Member
From: Dutch living in Malaysia
Registered: 2015-11-11
Posts: 21

Re: The dwm thread

I use dwm 6.1 with systray and follow the wiki's suggestion to make dwm restart without logging out or closing programs. It's all working great except that when restarting dwm programs with an icon in the tray (and only those) are closed. While I can certainly live with that, it would be nice if there's a way to prevent it. I tried searching for this, but it escapes my google-fu. I don't really know where to start looking either.

ETA: I noticed this specifically with radiotray, claws-mail and pidgin. Dropbox somehow survives or respawns.

Last edited by Henkm (2015-12-13 14:33:02)

Offline

#255 2015-12-13 15:01:49

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 160
Website

Re: The dwm thread

Henkm wrote:

I use dwm 6.1 with systray and follow the wiki's suggestion to make dwm restart without logging out or closing programs. It's all working great except that when restarting dwm programs with an icon in the tray (and only those) are closed. While I can certainly live with that, it would be nice if there's a way to prevent it. I tried searching for this, but it escapes my google-fu. I don't really know where to start looking either.

ETA: I noticed this specifically with radiotray, claws-mail and pidgin. Dropbox somehow survives or respawns.

Are those programs "minimized" to the tray when you do the re-start? if so, try bringing them out of the tray then do the restart. If that works, there's probably a bug. Dropbox is a bit of a different animal because it's working in the background, constantly monitoring directories, so it's not just sitting there waiting for you to do something like the rest of them. Radio tray and claws will probably stop because the internet connection is re-set. (just a guess)


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#256 2015-12-13 15:27:42

Henkm
Member
From: Dutch living in Malaysia
Registered: 2015-11-11
Posts: 21

Re: The dwm thread

I can test when I'm back at work tomorrow but I'm fairly sure I tried both ways with the same result. Pidgin and claws are fine when I disable the tray icon. Radiotray has no window/display other than the tray icon (so I replaced it with mpd/mpc and some keybindings). Other internet related programs (browser, irc client) are fine. I'm not aware that the internet connection is set by dwm anyway, I thought that was systemd's job.

Sorry for not mentioning earlier that I also applied the uselessgap patch. It seems unrelated, but as they always say in detective stories ...

Offline

#257 2015-12-13 15:57:14

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 160
Website

Re: The dwm thread

Henkm wrote:

I can test when I'm back at work tomorrow but I'm fairly sure I tried both ways with the same result. Pidgin and claws are fine when I disable the tray icon. Radiotray has no window/display other than the tray icon (so I replaced it with mpd/mpc and some keybindings). Other internet related programs (browser, irc client) are fine. I'm not aware that the internet connection is set by dwm anyway, I thought that was systemd's job.

Sorry for not mentioning earlier that I also applied the uselessgap patch. It seems unrelated, but as they always say in detective stories ...

yea...you're right about the internet connection. Not sure what I was thinking. Did it work ok with 6.0?


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#258 2015-12-13 16:02:38

wchouser3
Member
From: Indiana USA
Registered: 2013-08-13
Posts: 160
Website

Re: The dwm thread

It's hard to know if that little script needs some revision, if the systray patch has a bug, is it a bug with Xorg, or dwm it's self


If you can't be helpful, don't say anything at all. Fair enough?

Offline

#259 2015-12-20 02:33:03

Henkm
Member
From: Dutch living in Malaysia
Registered: 2015-11-11
Posts: 21

Re: The dwm thread

Henkm wrote:

I use dwm 6.1 with systray and follow the wiki's suggestion to make dwm restart without logging out or closing programs. It's all working great except that when restarting dwm programs with an icon in the tray (and only those) are closed. While I can certainly live with that, it would be nice if there's a way to prevent it. I tried searching for this, but it escapes my google-fu. I don't really know where to start looking either.

ETA: I noticed this specifically with radiotray, claws-mail and pidgin. Dropbox somehow survives or respawns.

Just to update, I've decided to sidestep the issue by not using the systray where I can avoid it easily (mpd/mpc for music, switch off tray-icons etc). It was never a big issue anyway as I don't recompile/restart daily.

Offline

Board footer

Powered by FluxBB