Re: [dwm] make setlayout toggle
On Wed, Nov 05, 2008 at 09:39:58AM +, Anselm R Garbe wrote: Ok, are there any concerns making this upstream again? (Yes I know, we had this already in earlier versions, by that time it was called togglelayout())... There were reasons for not toggling, basically it was confusing to toggle the layout after a long period of time, because one forgets about what the previous layout was. You shouldn't care about the previous layout, it's not a memory game. Users change layouts once they need it, then use another layout in order to fit their new needs and so forth. Changing the layout is not an hard task, i think. I already have some feature i never use but i wouldn't make a dwm-lite release. Please add only real useful code :-) Regards, Claudio M. Alessi -- JID: [EMAIL PROTECTED] WWW: http://dinotte.teroristi.org
Re: [dwm] make setlayout toggle
2008/11/20 Claudio M. Alessi [EMAIL PROTECTED]: On Wed, Nov 05, 2008 at 09:39:58AM +, Anselm R Garbe wrote: Ok, are there any concerns making this upstream again? (Yes I know, we had this already in earlier versions, by that time it was called togglelayout())... There were reasons for not toggling, basically it was confusing to toggle the layout after a long period of time, because one forgets about what the previous layout was. You shouldn't care about the previous layout, it's not a memory game. Users change layouts once they need it, then use another layout in order to fit their new needs and so forth. Changing the layout is not an hard task, i think. I already have some feature i never use but i wouldn't make a dwm-lite release. Please add only real useful code :-) Am I right that you are against re-adding the toggle? Kind regards, Anselm
Re: [dwm] make setlayout toggle
Definitively i do _not_ want to add such code in upstream. Claudio M. Alessi -- JID: [EMAIL PROTECTED] WWW: http://dinotte.teroristi.org
Re: [dwm] make setlayout toggle
2008/11/4 Neale Pickett [EMAIL PROTECTED]: yy [EMAIL PROTECTED] writes: After a quick look, I think the last check in the first if should be arg-v != lt[sellt^1] Yes, that's what it should have said. I wonder how it was working for me before, when I sent the code to the list. [cue twilight zone music] Here's what it should have said: void setlayout(const Arg *arg) { sellt ^= 1; if(arg arg-v (arg-v != lt[sellt^1])) lt[sellt] = (Layout *)arg-v; if(sel) arrange(); else drawbar(); } Ok, are there any concerns making this upstream again? (Yes I know, we had this already in earlier versions, by that time it was called togglelayout())... There were reasons for not toggling, basically it was confusing to toggle the layout after a long period of time, because one forgets about what the previous layout was. Kind regards, --Anselm
Re: [dwm] make setlayout toggle
On Wed, Nov 5, 2008 at 1:39 AM, Anselm R Garbe [EMAIL PROTECTED] wrote: Ok, are there any concerns making this upstream again? (Yes I know, we had this already in earlier versions, by that time it was called togglelayout())... There were reasons for not toggling, basically it was confusing to toggle the layout after a long period of time, because one forgets about what the previous layout was. I would love to see this upstream, but I don't know the history behind its removal from earlier versions so I'll defer to the long-time users.
Re: [dwm] make setlayout toggle
On Wed, Nov 5, 2008 at 1:39 AM, Anselm R Garbe [EMAIL PROTECTED] wrote: Ok, are there any concerns making this upstream again? (Yes I know, we had this already in earlier versions, by that time it was called togglelayout())... There were reasons for not toggling, basically it was confusing to toggle the layout after a long period of time, because one forgets about what the previous layout was. I think the behavior in vanilla dwm sucks less: - press MOD+1 to view tag 1 - press MOD+1 again = no-op - press MOD+TAB to view previously selected tag - press MOD+m to set monocle layout - press MOD+m again = no-op - press MOD+space to use previously selected layout The proposed change would add inconsistency, unless if people want the second MOD+1 to jump to the previously selected set of tags or do some other weird thing. Then again, I only ever switch between two layouts, and only use MOD+space.
Re: [dwm] make setlayout toggle
Donald Chai [EMAIL PROTECTED] writes: The proposed change would add inconsistency, unless if people want the second MOD+1 to jump to the previously selected set of tags or do some other weird thing. I think that would make more sense if all available layouts were shown at the top like the tags are. As it is they're two different beasts. Having said that, this is such a minor issue that I don't care at all what the default behavior is. It's just a 5 line addition to my config.h and I'm happy to put it on the wiki or whatever. I'm way more interested in not reparenting child processes to init, which is getting way less discussion ;) Neale
Re: [dwm] make setlayout toggle
On Wed, Nov 5, 2008 at 6:39 PM, Neale Pickett [EMAIL PROTECTED] wrote: Donald Chai [EMAIL PROTECTED] writes: The proposed change would add inconsistency, unless if people want the second MOD+1 to jump to the previously selected set of tags or do some other weird thing. I think that would make more sense if all available layouts were shown at the top like the tags are. As it is they're two different beasts. I agree, to me it's comparing apples with oranges. Tags are locations (albeit virtual) and layouts are styles. Having said that, this is such a minor issue that I don't care at all what the default behavior is. It's just a 5 line addition to my config.h and I'm happy to put it on the wiki or whatever. Agreed as well, I'm fine with keeping this a separate function in config.h if the consensus is against it.
Re: [dwm] make setlayout toggle
Nice! I can't wait to try this out, I constantly hit mod-m to try to switch out of monocle mode yet somehow I never thought to implement this feature... -Niki Yoshiuchi On Tue, Nov 4, 2008 at 12:13 PM, Neale Pickett [EMAIL PROTECTED] wrote: This simple modification to setlayout causes a binding to toggle if it's already in the requested layout. void setlayout(const Arg *arg) { sellt ^= 1; if(arg arg-v (arg-v != lt[sellt])) lt[sellt] = (Layout *)arg-v; if(sel) arrange(); else drawbar(); } Now Alt-M toggles in and out of Monocle, etc. I far prefer this behavior, YMMV. Neale
Re: [dwm] make setlayout toggle
On Tue, Nov 4, 2008 at 9:13 AM, Neale Pickett [EMAIL PROTECTED] wrote: This simple modification to setlayout causes a binding to toggle if it's already in the requested layout. Now Alt-M toggles in and out of Monocle, etc. I far prefer this behavior, YMMV. This is a great idea and one I would have tried to implement if I knew C, however for me it doesn't work as expected. Upon patching dwm.c the behaviour of setlayout() remains unchanged. Mod-m activates monocle, but pressing it a second time appears to do nothing.
Re: [dwm] make setlayout toggle
On Tue, Nov 04, 2008 at 10:13:21AM -0700, Neale Pickett wrote: This simple modification to setlayout causes a binding to toggle if it's already in the requested layout. void setlayout(const Arg *arg) { sellt ^= 1; if(arg arg-v (arg-v != lt[sellt])) lt[sellt] = (Layout *)arg-v; if(sel) arrange(); else drawbar(); } Now Alt-M toggles in and out of Monocle, etc. I far prefer this behavior, YMMV. Would love to have this, but this patch doesn't work for me. -RPM
Re: [dwm] make setlayout toggle
After a quick look, I think the last check in the first if should be arg-v != lt[sellt^1] -- - yiyus || JGL .
Re: [dwm] make setlayout toggle
That did the trick, thanks! On Tue, Nov 4, 2008 at 12:31 PM, yy [EMAIL PROTECTED] wrote: After a quick look, I think the last check in the first if should be arg-v != lt[sellt^1]
Re: [dwm] make setlayout toggle
yy [EMAIL PROTECTED] writes: After a quick look, I think the last check in the first if should be arg-v != lt[sellt^1] Yes, that's what it should have said. I wonder how it was working for me before, when I sent the code to the list. [cue twilight zone music] Here's what it should have said: void setlayout(const Arg *arg) { sellt ^= 1; if(arg arg-v (arg-v != lt[sellt^1])) lt[sellt] = (Layout *)arg-v; if(sel) arrange(); else drawbar(); } Neale