Re: [dwm] Border hater, border lover
2008/12/17 yy : > 2008/12/17 Anselm R Garbe : >> It's in. Please recheck if there are any issues. Otherwise I'm going >> to release 5.4 tomorrow. >> > > Two things (of not too much importance, anyway): > > 1. What about the applyrules modification discussed in > http://lists.suckless.org/dwm/0812/7057.html ? > 2. IMO the issingle variable name in adjustborder() should be changed, > e.g. to hasborder. > > I will elaborate on #2: I'm using a modified monocle where the border > is removed when the status bar is not visible, so that I have some > kind of fullscreen layout (very useful for firefox video windows from > some sites). When I have seen this new function I thought that it > would perfectly fit in this function (maybe it could even go into > main? I think it will be just one more line), but issingle doesn't > make too much sense then. > > Anyway, as I told, nothing important... > > > -- > > > - yiyus || JGL . > I have just realized it wouldn't need a single line of code to remove the border in "fullscreen" layout (i.e.: monocle + !showbar). Inside monocle, doesn't adjustborder(c, n == 1 || !showbar) make sense to you? Maybe you could also have a new define in config.h, so people can choose: #define MONOCLEBORDER n == 1 #define MONOCLEBORDER n == 1 || !showbar #define MONOCLEBORDER True Anyway, having borders in monocle is probably a matter of taste, but it is so easy adding your own layout that I doubt it is even a matter... PS: I will stop rambling now and will wait for tomorrow release. Good night! -- - yiyus || JGL .
Re: [dwm] Border hater, border lover
2008/12/17 Anselm R Garbe : > It's in. Please recheck if there are any issues. Otherwise I'm going > to release 5.4 tomorrow. > Two things (of not too much importance, anyway): 1. What about the applyrules modification discussed in http://lists.suckless.org/dwm/0812/7057.html ? 2. IMO the issingle variable name in adjustborder() should be changed, e.g. to hasborder. I will elaborate on #2: I'm using a modified monocle where the border is removed when the status bar is not visible, so that I have some kind of fullscreen layout (very useful for firefox video windows from some sites). When I have seen this new function I thought that it would perfectly fit in this function (maybe it could even go into main? I think it will be just one more line), but issingle doesn't make too much sense then. Anyway, as I told, nothing important... -- - yiyus || JGL .
Re: [dwm] Border hater, border lover
2008/12/15 Anselm R Garbe : > 2008/12/14 voltaic : >> It seems this idea was forgotten again, so I thought I would bring it >> up once more. As DWM 5.4 is being finalized and there is discussion on >> what to include in future versions, I'd love to see the >> no-border-if-single-window behavior become mainstream. > > Agreed, will push a patch accordingly during the day. It's in. Please recheck if there are any issues. Otherwise I'm going to release 5.4 tomorrow. Kind regards, --Anselm
Re: [dwm] Border hater, border lover
2008/12/14 voltaic : > It seems this idea was forgotten again, so I thought I would bring it > up once more. As DWM 5.4 is being finalized and there is discussion on > what to include in future versions, I'd love to see the > no-border-if-single-window behavior become mainstream. Agreed, will push a patch accordingly during the day. Kind regards, --Anselm
Re: [dwm] Border hater, border lover
It seems this idea was forgotten again, so I thought I would bring it up once more. As DWM 5.4 is being finalized and there is discussion on what to include in future versions, I'd love to see the no-border-if-single-window behavior become mainstream. On Sun, Aug 3, 2008 at 9:36 AM, Sunnan wrote: > At Sun, 3 Aug 2008 09:54:56 -0400, > James Turner wrote: >> Do you only see the strange bstack behavior with your patch applied? >> After reading your post I went back and looked at the patch, I noticed a >> minor diff between bstack and tile ( - instead of a + in one line ). I > > That could be it; I've applied the change and will let you know if the > problems re-appear. I won't see the change until I restart X. > > Sunnan > >
Re: [dwm] Border hater, border lover
At Sun, 3 Aug 2008 09:54:56 -0400, James Turner wrote: > Do you only see the strange bstack behavior with your patch applied? > After reading your post I went back and looked at the patch, I noticed a > minor diff between bstack and tile ( - instead of a + in one line ). I That could be it; I've applied the change and will let you know if the problems re-appear. I won't see the change until I restart X. Sunnan
Re: [dwm] Border hater, border lover
Sunnan, Do you only see the strange bstack behavior with your patch applied? After reading your post I went back and looked at the patch, I noticed a minor diff between bstack and tile ( - instead of a + in one line ). I just pushed a new diff you can either get it here [0]. If you saw this issue without your patch let me know if this fixes it. It should be pretty much in line with the current tile now. Thanks. [0] http://bsdgroup.org/files/dwm-5.1-bstack.diff -- James Turner BSD Group Consulting http://www.bsdgroup.org
Re: [dwm] Border hater, border lover
At Sun, 3 Aug 2008 13:26:27 +0100, Anselm R Garbe wrote: > Hmm, there is no need for --n. > > if(n == 1) { > resize(c, wx-c->bw, wy-c->bw, ww, wh, resizehints); > return; > } > ... It uses n when it stacks the tile and depends on n being the number of non-master clients, i.e. decremented. Sunnan
Re: [dwm] Border hater, border lover
2008/8/3 Sunnan <[EMAIL PROTECTED]>: > Well, I've experienced some buggy behavior and I have no idea what the > problem might be and if it's because of this hack or not. The > behaviour is that sometimes I'll have two clients visible (one per tag > and both tags visible) and then both try to be master, one taking up > mh (I'm using bstack) and one taking up wh-mh but both starting at the > top of the screen. That might be a issue in bstack, but I never noticed such behavior in default dwm. > Anyway, I found a nicer-looking (???) way to code my original > suggestion; instead of: >if(n==1) > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); >else > resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); > >if(--n == 0) >return; > > The two checks can be folded into one, like this: > >if (--n == 0) { > resize(c, wx-c->bw, wy-c->bw, ww, wh, resizehints); > return; >} >resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); > > the guard clause allowing us to eliminate the else. Hmm, there is no need for --n. if(n == 1) { resize(c, wx-c->bw, wy-c->bw, ww, wh, resizehints); return; } ... > Btw, there's a huge amount of "- 2 * c->bw" in dwm; maybe this could > be extracted to a function or macro? Yeah, might look cleaner. Kind regards, --Anselm
Re: [dwm] Border hater, border lover
Well, I've experienced some buggy behavior and I have no idea what the problem might be and if it's because of this hack or not. The behaviour is that sometimes I'll have two clients visible (one per tag and both tags visible) and then both try to be master, one taking up mh (I'm using bstack) and one taking up wh-mh but both starting at the top of the screen. Anyway, I found a nicer-looking (???) way to code my original suggestion; instead of: if(n==1) resize(c, wx-c->bw, wy-c->bw, ww, wh, False); else resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); if(--n == 0) return; The two checks can be folded into one, like this: if (--n == 0) { resize(c, wx-c->bw, wy-c->bw, ww, wh, resizehints); return; } resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); the guard clause allowing us to eliminate the else. The weird behavior is the same with both versions, though... wonder what I've done wrong. Btw, there's a huge amount of "- 2 * c->bw" in dwm; maybe this could be extracted to a function or macro? I've got a lisp background so I never want two sexps looking the same; and when I try to write C (with mediocre results) I tend to think of the syntax tree nodes as sexps, too. I'd love it if this automatic border toggling becomes mainstream, though! Thanks for your attention. Sunnan At Sun, 3 Aug 2008 10:56:20 +0100, Anselm R Garbe wrote: > > You remember me that I considered this for mainstream dwm a while ago, > but forgot about it. Since all tiled windows are restacked under the > bar window, I don't see any flaws in this solution. The usual way of > doing it, would be to set the c->bw to 0 in such a case, but some > clients perform poorly with this, so I really like this particular > solution. > > Any objections in making this mainstream? > > Kind regards, > Anselm > > 2008/8/2 Sunnan <[EMAIL PROTECTED]>: > > I didn't want to set border size to 0 because I do like them when I > > have more then one client on the screen at the same time, but I don't > > want them when I just have one. > > > > So I suggest something like this: > > > > in monocle: > > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > > > > (as per Alexander Polakov's suggestion that I found in this list's > > archives.) > > > > in tile: > > if(n==1) > > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > > else > > resize(c, wx, wy, mw - 2 * c->bw, wh - 2 * c->bw, resizehints); > > > > in bstack: > > (I love bstack (maybe because I hate widescreen) and I hardly ever use the > > regular tile mode.) > > > > if(n==1) > > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > > else > > resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); > > > > Ugh, I'd rather fold those if/elses back into one with ternaries, but > > then we'd need three conditionals instead of one. (Which the compiler > > would probably catch, anyway...) > > > > So, in closing: > > I love dwm (just switched to the main branch from good old > > dwm-4.6-rfigura once I realized that bstack was available as a patch) and > > this is my first post to this list. > > > > I hope that this functionality can go into main; it doesn't increase > > the mental load on the user (like toggleborders or a config option > > would) since it happens automatically, but if you don't like it, I'll > > understand. > > > > Sunnan >
Re: [dwm] Border hater, border lover
You remember me that I considered this for mainstream dwm a while ago, but forgot about it. Since all tiled windows are restacked under the bar window, I don't see any flaws in this solution. The usual way of doing it, would be to set the c->bw to 0 in such a case, but some clients perform poorly with this, so I really like this particular solution. Any objections in making this mainstream? Kind regards, Anselm 2008/8/2 Sunnan <[EMAIL PROTECTED]>: > I didn't want to set border size to 0 because I do like them when I > have more then one client on the screen at the same time, but I don't > want them when I just have one. > > So I suggest something like this: > > in monocle: > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > > (as per Alexander Polakov's suggestion that I found in this list's archives.) > > in tile: > if(n==1) > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > else > resize(c, wx, wy, mw - 2 * c->bw, wh - 2 * c->bw, resizehints); > > in bstack: > (I love bstack (maybe because I hate widescreen) and I hardly ever use the > regular tile mode.) > > if(n==1) > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > else > resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); > > Ugh, I'd rather fold those if/elses back into one with ternaries, but > then we'd need three conditionals instead of one. (Which the compiler > would probably catch, anyway...) > > So, in closing: > I love dwm (just switched to the main branch from good old > dwm-4.6-rfigura once I realized that bstack was available as a patch) and > this is my first post to this list. > > I hope that this functionality can go into main; it doesn't increase > the mental load on the user (like toggleborders or a config option > would) since it happens automatically, but if you don't like it, I'll > understand. > > Sunnan
Re: [dwm] Border hater, border lover
On Sat, Aug 2, 2008 at 9:41 AM, Sunnan <[EMAIL PROTECTED]> wrote: > I didn't want to set border size to 0 because I do like them when I > have more then one client on the screen at the same time, but I don't > want them when I just have one. > > So I suggest something like this: > > in monocle: > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > > (as per Alexander Polakov's suggestion that I found in this list's > archives.) > > in tile: > if(n==1) > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > else > resize(c, wx, wy, mw - 2 * c->bw, wh - 2 * c->bw, resizehints); > > in bstack: > (I love bstack (maybe because I hate widescreen) and I hardly ever use the > regular tile mode.) > > if(n==1) > resize(c, wx-c->bw, wy-c->bw, ww, wh, False); > else > resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); > > Ugh, I'd rather fold those if/elses back into one with ternaries, but > then we'd need three conditionals instead of one. (Which the compiler > would probably catch, anyway...) > > So, in closing: > I love dwm (just switched to the main branch from good old > dwm-4.6-rfigura once I realized that bstack was available as a patch) and > this is my first post to this list. > > I hope that this functionality can go into main; it doesn't increase > the mental load on the user (like toggleborders or a config option > would) since it happens automatically, but if you don't like it, I'll > understand. > > Sunnan > > > > -- Ian Daniher -- OLPC Support Volunteer OLPCinci Repair Center Coordinator -- [EMAIL PROTECTED] Skype : it.daniher irc.freenode.com: Ian_Daniher -- c: 513.290.4942
[dwm] Border hater, border lover
I didn't want to set border size to 0 because I do like them when I have more then one client on the screen at the same time, but I don't want them when I just have one. So I suggest something like this: in monocle: resize(c, wx-c->bw, wy-c->bw, ww, wh, False); (as per Alexander Polakov's suggestion that I found in this list's archives.) in tile: if(n==1) resize(c, wx-c->bw, wy-c->bw, ww, wh, False); else resize(c, wx, wy, mw - 2 * c->bw, wh - 2 * c->bw, resizehints); in bstack: (I love bstack (maybe because I hate widescreen) and I hardly ever use the regular tile mode.) if(n==1) resize(c, wx-c->bw, wy-c->bw, ww, wh, False); else resize(c, wx, wy, ww - 2 * c->bw, mh - 2 * c->bw, resizehints); Ugh, I'd rather fold those if/elses back into one with ternaries, but then we'd need three conditionals instead of one. (Which the compiler would probably catch, anyway...) So, in closing: I love dwm (just switched to the main branch from good old dwm-4.6-rfigura once I realized that bstack was available as a patch) and this is my first post to this list. I hope that this functionality can go into main; it doesn't increase the mental load on the user (like toggleborders or a config option would) since it happens automatically, but if you don't like it, I'll understand. Sunnan