[dwm] dwm-4.4
Hi there, I created dwm-4.4, you can download it from http://www.suckless.org/download/dwm-4.4.tar.gz This release contains certain bug fixes, a lot of code polishing and some removed features. I refer to the mailing list archives for details. Regards, -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361
Re: [dwm] dwm-4.4
Tako rzecze Anselm R. Garbe (w e-mailu datowanym 2007-08-23, 18:19): Hi there, I created dwm-4.4, you can download it from http://www.suckless.org/download/dwm-4.4.tar.gz This release contains certain bug fixes, a lot of code polishing and some removed features. I refer to the mailing list archives for details. Great, looks like the keyboard-focus-taken-away indicator problem described in one of my recent postings got fixed to. At least I didn't manage to reproduce it. Thanks, [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' pgpTP29VuhHus.pgp Description: PGP signature
Re: [dwm] dwm-4.4
On Thu, Aug 23, 2007 at 06:19:13PM +0200, Anselm R. Garbe wrote: Hi there, I created dwm-4.4, you can download it from http://www.suckless.org/download/dwm-4.4.tar.gz This release contains certain bug fixes, a lot of code polishing and some removed features. I refer to the mailing list archives for details. Regards, -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361 Hopefully the wonderful patches out for dwm-4.3 will be ported up to this new version :) -- Jeremy O'Brien aka neutral_insomniac GPG key: 0xB1140FDB http://pohl.ececs.uc.edu/~jeremy/jeremy.asc Linux ambelina 2.6.22.1 ppc 7447A, altivec supported PowerBook5,8 GNU/Linux pgpam8Tm7N7jz.pgp Description: PGP signature
Re: [dwm] dwm-4.4
On Thu, Aug 23, 2007 at 12:45:47PM -0400, Jeremy O'Brien wrote: On Thu, Aug 23, 2007 at 06:19:13PM +0200, Anselm R. Garbe wrote: Hi there, I created dwm-4.4, you can download it from http://www.suckless.org/download/dwm-4.4.tar.gz This release contains certain bug fixes, a lot of code polishing and some removed features. I refer to the mailing list archives for details. Regards, -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361 Hopefully the wonderful patches out for dwm-4.3 will be ported up to this new version :) -- Jeremy O'Brien aka neutral_insomniac GPG key: 0xB1140FDB http://pohl.ececs.uc.edu/~jeremy/jeremy.asc Linux ambelina 2.6.22.1 ppc 7447A, altivec supported PowerBook5,8 GNU/Linux Speaking of patches, you can get the updated bstack and main (openbsd only) patch from http://calminferno.net/files/. I only ported the bstack portrait layout since thats all I use. Enjoy, and feel free to post any issues. -- James Turner BSD Group Consulting http://www.bsdgroup.org --- config.default.hTue Aug 21 18:09:46 2007 +++ config.default.hTue Aug 21 18:10:27 2007 @@ -31,6 +31,7 @@ static Layout layouts[] = { \ /* symbol function */ \ { []=,tile }, /* first entry is default */ \ { ,floating }, \ + { TTT,bstack }, \ }; #define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */ #define SNAP 32 /* snap pixel */ --- tile.c Tue Aug 21 18:09:46 2007 +++ tile.c Tue Aug 21 18:17:00 2007 @@ -12,7 +12,7 @@ void setmwfact(const char *arg) { double delta; - if(!isarrange(tile)) + if(!isarrange(tile) !isarrange(bstack)) return; /* arg handling, manipulate mwfact */ if(arg == NULL) @@ -71,10 +71,49 @@ tile(void) { } void +bstack(void) { + unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th; + Client *c; + + for(n = 0, c = nexttiled(clients); c; c = nexttiled(c-next)) + n++; + + /* window geoms */ + mh = (n 1) ? (wah * mwfact) / 1 : wah / (n 0 ? n : 1); + mw = waw; + th = (n 1) ? (wah * (1 - mwfact)) / 1 : 0; + tw = (n 1) ? waw / (n - 1) : 0; + + for(i = 0, c = nexttiled(clients); c; c = nexttiled(c-next)) { + c-ismax = False; + nx = wax; + ny = way; + if(i 1) { + ny += i * mh; + nw = mw - 2 * c-border; + nh = mh - 2 * c-border; + } + else { + nx += (i - 1) * tw; + ny += mh * 1; + if(i + 1 == n) { /* remainder */ + nw = (wax + waw) - nx - 2 * c-border; + } + else { + nw = tw - 2 * c-border; + } + nh = th - 2 * c-border + 1; + } + resize(c, nx, ny, nw, nh, False); + i++; + } +} + +void zoom(const char *arg) { Client *c; - if(!sel || !isarrange(tile) || sel-isfloating) + if(!sel || (!isarrange(tile) !isarrange(bstack)) || sel-isfloating) return; if((c = sel) == nexttiled(clients)) if(!(c = nexttiled(c-next))) --- tile.h Tue Aug 21 18:09:46 2007 +++ tile.h Tue Aug 21 18:10:55 2007 @@ -3,4 +3,5 @@ /* tile.c */ void setmwfact(const char *arg); /* sets master width factor */ void tile(void); /* arranges all windows tiled */ +void bstack(void); /* arranges all windows bottom stacked */ void zoom(const char *arg);/* zooms the focused client to master area, arg is ignored */ --- main.c Thu Aug 23 12:11:41 2007 +++ main.c Thu Aug 23 09:15:10 2007 @@ -221,7 +221,7 @@ XDefineCursor(dpy, barwin, cursor[CurNormal]); updatebarpos(); XMapRaised(dpy, barwin); - strcpy(stext, dwm-VERSION); + strlcpy(stext, dwm-VERSIONi, sizeof(stext)); /* pixmap for everything */ dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); dc.gc = XCreateGC(dpy, root, 0, 0);
[dwm] fibonacci and workspace patch for 4.4
Hi all, I updated/made two patches for the dwm 4.4 release. They can be found at http://schot.a-eskwadraat.nl/files/ Fibonacci is the spiral layout I posted earlier with an extra layout that arranges the smaller tiles to the bottom right instead of the centre: +---+---+ | | | | | 2 | | | | | 1 +--+--+-+ | | | 4 | | | 3 +--+--+ | | | 5|-.| +---+-+-+ The workspace patch replaces the tag model with classical workspaces: You can view only one tag at a time, but workspaces have separate layouts. Regards, -- Jeroen Schot [EMAIL PROTECTED] (mail jabber) http://schot.a-eskwadraat.nl
Re: [dwm] dwm-4.4
On Thu, Aug 23, 2007 at 06:32:21PM +0200, Antoni Grzymala wrote: Great, looks like the keyboard-focus-taken-away indicator problem described in one of my recent postings got fixed to. At least I didn't manage to reproduce it. It happens to me. The behaviour had gone away with the fix a little while ago, but has reappeared within the last week (according to my flakey memory). I have a key bound to a shell script which passes any URLs on the clipboard to my web browser (Opera). If I look at the browser view (I have one tag exclusively for my web browser), then back to another view, then use the clipboard-url key, then I lose focus. If I refocus my non-browser view (without going to the browser view first) and then invoke the script again, then I don't lose focus. I have just updated to hg tip (changeset: 975:1c30ac0aee7f) to test this. Karl. -- http://mowson.org/karl
Re: [dwm] dwm-4.4
wtf!? xkill doesn't works?!?? On Thu, 23 Aug 2007 18:19:13 +0200 Anselm R. Garbe [EMAIL PROTECTED] wrote: Hi there, I created dwm-4.4, you can download it from http://www.suckless.org/download/dwm-4.4.tar.gz This release contains certain bug fixes, a lot of code polishing and some removed features. I refer to the mailing list archives for details. Regards, -- Anselm R. Garbe http://www.suckless.org/ GPG key: 0D73F361 --pancake
[dwm] GNU screen-like workflow suggestion for dwm.
Dear gals and lads; I have a little suggestion (for someone to turn into live code) that would in my opinion ease working with tags greatly. Let's say I'm viewing clients tagged 1 and 4 and I want to quickly glance at tag 3. Then I want to get back to what I was doing with a single keystroke. Say this would be mod-` in my case. So dwm should remember last viewed tags before change and have a function (with a key bound to it) to return. This way by pressing the key again I could quickly swap between 1, 4 and 3 without remembering where I actually was last. I use a similar workflow in GNU screen, where you swap between current and last seen screen by double-pressing the screen escape key, instead of searching or cycling. Quick and convenient. Hope my explanation is clear. What do you think? [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' pgpPuF1JDnAIl.pgp Description: PGP signature
Re: [dwm] dwm-4.4
Tako rzecze pancake (w e-mailu datowanym 2007-08-23, 22:32): wtf!? xkill doesn't works?!?? Confirmed. It doesn't. [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' pgpTfSVe7SYGE.pgp Description: PGP signature
Re: [dwm] dwm-4.4
On 8/24/07, pancake [EMAIL PROTECTED] wrote: wtf!? xkill doesn't works?!?? Yep, xkill stopped working. -arun
Re: [dwm] GNU screen-like workflow suggestion for dwm.
On 8/24/07, Antoni Grzymala [EMAIL PROTECTED] wrote: I use a similar workflow in GNU screen, where you swap between current and last seen screen by double-pressing the screen escape key, instead of searching or cycling. Quick and convenient. Hope my explanation is clear. What do you think? Sounds good IMO. --arun
Re: [dwm] GNU screen-like workflow suggestion for dwm.
I use a similar workflow in GNU screen, where you swap between current and last seen screen by double-pressing the screen escape key, instead of searching or cycling. Quick and convenient. May be that this would be a bit more complex than in ratpoison or screen, since what should be remembered is not a client or a pseudoterminal but a set of them (a view). Anyway, it would be useful (I miss slightly it in dwm, being a former ratpoison user). Giorgio Lando
Re: [dwm] GNU screen-like workflow suggestion for dwm.
Tako rzecze Alexander Polakov (w e-mailu datowanym 2007-08-24, 00:51): * Antoni Grzymala [EMAIL PROTECTED] [070824 00:37]: Dear gals and lads; I have a little suggestion (for someone to turn into live code) that would in my opinion ease working with tags greatly. Let's say I'm viewing clients tagged 1 and 4 and I want to quickly glance at tag 3. Then I want to get back to what I was doing with a single keystroke. Say this would be mod-` in my case. So dwm should remember last viewed tags before change and have a function (with a key bound to it) to return. This way by pressing the key again I could quickly swap between 1, 4 and 3 without remembering where I actually was last. I use a similar workflow in GNU screen, where you swap between current and last seen screen by double-pressing the screen escape key, instead of searching or cycling. Quick and convenient. Hope my explanation is clear. What do you think? [a] More general idea is to have multiple views (sets of tags) which can be called with a hotkey. I think this is an entirely different idea (not encompassing mine), as in my case the “last seen view” is dynamic. Not that yours is not worth considering. OTH, isn't it actually currently possible to bind a single key to view a predefined set of tags? [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' pgpAN0wWvMAX7.pgp Description: PGP signature
Re: [dwm] GNU screen-like workflow suggestion for dwm.
More general idea is to have multiple views (sets of tags) which can be called with a hotkey. To solve this problem I tried for some time with master and slave tags. Master tags could have any number of slave tags viewed, and they were remembered. i. e. I had the tags: 1 2 3 4 www irc a b c, and the slave tags were www, irc, a, b and c. It wasn't extremely useful and I found it too complicated, but somebody could think in something with these ideas. btw: the screen behaviour you talk about is easy to do in dwm. you just need a Bool *prevtags and set it whenever view is called (also with toggleview? I don't think so) and a function to view prevtags. Send an email if you have problems. -- - yiyus || JGL .
Re: [dwm] GNU screen-like workflow suggestion for dwm.
Tako rzecze y i y u s (w e-mailu datowanym 2007-08-23, 23:09): btw: the screen behaviour you talk about is easy to do in dwm. you just need a Bool *prevtags and set it whenever view is called (also with toggleview? I don't think so) and a function to view prevtags. Send an email if you have problems. I can imagine it's pretty easy to program, but I'm not a C programmer and would waste tons of time on trying to implement it. Thought that maybe someone who likes the idea would do it for (her|him)self and me. Best, [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' pgpOHBTPLDgre.pgp Description: PGP signature
[dwm] floating lava layout
Thinking about layouts and minicalistic eyecandy stuff I got the idea to add motion and semi-tiling layout for the floating mode. My idea tries to fix a little bit the usability problems of the floating layout. IMHO this layout is ok as is, so it's simple. But you have to move windows around with the mouse. That's pretty ugly, and if you work with multiple windows like gimp it results (more efficient than icewm f.ex) but it's easy to have stacked windows on the same position losing its visibility and making you loss time moving all the windows to try to find the hidden one. (or switch between clients with the keyboard (not very nice with gimp). My proposal is to be able to write a layout for the floating mode. Is it possible now? What I have in mind is something bigger and complex that may not fit dwm, but can probably feed minds with new ideas for usability. This lava-layout will tend on the fact that floating windows usually have similar sizes during its life. Logging this information you can get a list of sizes (storing the ~10 more significant) and cleaning up this list. This mode tiles the windows in a form that none of them can be overlapped, but they can be resized or moved. When the corner of the window you're moving collides with another one, this makes it move. Adding two resizing points (top-left, bottom-right) for clients could be interesting to test on floating mode, so, some times you have windows on the right side of the screen and you want to resize them to the left. Clients size should try to keep the aspect size of the list of the previously stored. Something like swap client's position if the overlap 60% (for example) would be cool too. (This is a feature of wmii I love when I was using it) --pancake
Re: [dwm] GNU screen-like workflow suggestion for dwm.
Evidently, it hasn't been tested for much time. but here you have. (I defined MOD+Scape to come back to previously selected tags, probably a better solution is the key at the left of 1, but that's not standard for all the keyboards...) 2007/8/23, Antoni Grzymala [EMAIL PROTECTED]: Tako rzecze y i y u s (w e-mailu datowanym 2007-08-23, 23:09): btw: the screen behaviour you talk about is easy to do in dwm. you just need a Bool *prevtags and set it whenever view is called (also with toggleview? I don't think so) and a function to view prevtags. Send an email if you have problems. I can imagine it's pretty easy to program, but I'm not a C programmer and would waste tons of time on trying to implement it. Thought that maybe someone who likes the idea would do it for (her|him)self and me. Best, [a] -- -- - yiyus || JGL . diff -up dwm-4.4/config.default.h dwm-4.4-prevtags/config.default.h --- dwm-4.4/config.default.h 2007-08-23 18:11:41.0 +0200 +++ dwm-4.4-prevtags/config.default.h 2007-08-23 23:34:46.0 +0200 @@ -52,6 +52,7 @@ Key keys[] = { \ { MODKEY, XK_Return, zoom, NULL }, \ { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, \ { MODKEY|ShiftMask, XK_c, killclient, NULL }, \ + { MODKEY, XK_Escape, viewprevtag, NULL }, \ { MODKEY, XK_0, view, NULL }, \ { MODKEY, XK_1, view, tags[0] }, \ { MODKEY, XK_2, view, tags[1] }, \ diff -up dwm-4.4/dwm.h dwm-4.4-prevtags/dwm.h --- dwm-4.4/dwm.h 2007-08-23 18:11:41.0 +0200 +++ dwm-4.4-prevtags/dwm.h 2007-08-23 23:30:34.0 +0200 @@ -81,7 +81,7 @@ extern unsigned int bh, blw, bpos; /* b extern unsigned int ntags, numlockmask; /* number of tags, numlock mask */ extern void (*handler[LASTEvent])(XEvent *); /* event handler */ extern Atom wmatom[WMLast], netatom[NetLast]; -extern Bool selscreen, *seltags; /* seltags is array of Bool */ +extern Bool selscreen, *seltags, *prevtags; /* seltags is array of Bool */ extern Client *clients, *sel, *stack; /* global client list and stack */ extern Cursor cursor[CurLast]; extern DC dc; /* global draw context */ @@ -139,6 +139,7 @@ void toggletag(const char *arg); /* togg void toggleview(const char *arg); /* toggles the tag with arg's index (in)visible */ void updatebarpos(void); /* updates the bar position */ void view(const char *arg); /* views the tag with arg's index */ +void viewprevtag(const char *arg); /* views previous selected tags */ /* util.c */ void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */ diff -up dwm-4.4/main.c dwm-4.4-prevtags/main.c --- dwm-4.4/main.c 2007-08-23 18:11:41.0 +0200 +++ dwm-4.4-prevtags/main.c 2007-08-23 23:40:09.0 +0200 @@ -21,7 +21,7 @@ unsigned int bh, ntags; unsigned int bpos = BARPOS; unsigned int numlockmask = 0; Atom wmatom[WMLast], netatom[NetLast]; -Bool *seltags; +Bool *seltags, *prevtags; Bool selscreen = True; Client *clients = NULL; Client *sel = NULL; @@ -58,6 +58,7 @@ cleanup(void) { XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); XSync(dpy, False); free(seltags); + free(prevtags); } static unsigned long @@ -196,7 +197,9 @@ setup(void) { compileregs(); for(ntags = 0; tags[ntags]; ntags++); seltags = emallocz(sizeof(Bool) * ntags); + prevtags = emallocz(sizeof(Bool) * ntags); seltags[0] = True; + prevtags[0] = True; /* style */ dc.norm[ColBorder] = initcolor(NORMBORDERCOLOR); dc.norm[ColBG] = initcolor(NORMBGCOLOR); diff -up dwm-4.4/screen.c dwm-4.4-prevtags/screen.c --- dwm-4.4/screen.c 2007-08-23 18:11:41.0 +0200 +++ dwm-4.4-prevtags/screen.c 2007-08-23 23:30:57.0 +0200 @@ -367,10 +367,25 @@ void view(const char *arg) { unsigned int i; - for(i = 0; i ntags; i++) + for(i = 0; i ntags; i++) { + prevtags[i] = seltags[i]; seltags[i] = arg == NULL; + } i = idxoftag(arg); if(i = 0 i ntags) seltags[i] = True; arrange(); } + +void +viewprevtag(const char *arg) { + unsigned int i; + Bool t; + + for(i = 0; i ntags; i++) { + t = seltags[i]; + seltags[i] = prevtags[i]; + prevtags[i] = t; + } + arrange(); +}
Re: [dwm] GNU screen-like workflow suggestion for dwm.
Tako rzecze y i y u s (w e-mailu datowanym 2007-08-23, 23:45): Evidently, it hasn't been tested for much time. but here you have. (I defined MOD+Scape to come back to previously selected tags, probably a better solution is the key at the left of 1, but that's not standard for all the keyboards...) Thanks a million! I need to get some sleep now, will do the patching tomorrow and see whether it's as good as I thought it would be in practice. For now, goodnight, [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' pgps5DNOU1top.pgp Description: PGP signature
Re: [dwm] GNU screen-like workflow suggestion for dwm.
The problem with remembered states is something applicable to clients, tags, the status bar, the maximize, the floating, ... the concept is used in several places, and not all of them works always in all modes or layouts. This breaks my concept of orthogonal usability. When I started to use dwm I was a addict to icewm and I was having some missconceptions of workpath. I have been thinking about it and I can say that I tend to open more windows on non-tiled window managers (because I lost most of them because they are not enought visible). This doesn't happens on dwm, and this makes it more productive, less resources used and better visibility of the applications. Icewm, uses by default a client-switching algorithm similar to the w32 or OSX one. This is: - You press alt-tab - swap order of client list - go next - You press alt-tab twice without dropping 'alt' - go next This model looks simple and enought eficient because if you press alt-tab you will always go to the previous app you were working, and you it recycles the same key for cycling between clients. The previous algo is probably innecesary on dwm, because clients are sorted and all of them are visible, and you can easily switch between them without the need of useless complexity. I tend to usually relacionate the toggling problematic with the alt-tab concepts. IMHO having a toggle for everything would be cool, but maybe innecesary. What I do in the clients-per-tag patch is that you can switch between the number you say or 'normal'. So you have to store another variable to define the toggling value. The layout per tag discussion is pretty similar to the same. Having toggles implies to make the code more conditional and complex. It shouldn't. Maybe we can join all these toggles on a single array and index it with a string like: b^1 (toggle bar to zero to 1) f^1 (toggle floating mode) w^1 (toggle previous client focus) I vote for Control+Tab and Control+Shift+Tab (if anybody writes this patch O:) --pancake On Thu, 23 Aug 2007 22:35:05 +0200 Antoni Grzymala [EMAIL PROTECTED] wrote: Dear gals and lads; I have a little suggestion (for someone to turn into live code) that would in my opinion ease working with tags greatly. Let's say I'm viewing clients tagged 1 and 4 and I want to quickly glance at tag 3. Then I want to get back to what I was doing with a single keystroke. Say this would be mod-` in my case. So dwm should remember last viewed tags before change and have a function (with a key bound to it) to return. This way by pressing the key again I could quickly swap between 1, 4 and 3 without remembering where I actually was last. I use a similar workflow in GNU screen, where you swap between current and last seen screen by double-pressing the screen escape key, instead of searching or cycling. Quick and convenient. Hope my explanation is clear. What do you think? [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' --pancake
Re: [dwm] GNU screen-like workflow suggestion for dwm.
Tako rzecze Antoni Grzymala (w e-mailu datowanym 2007-08-23, 23:52): Tako rzecze y i y u s (w e-mailu datowanym 2007-08-23, 23:45): Evidently, it hasn't been tested for much time. but here you have. (I defined MOD+Scape to come back to previously selected tags, probably a better solution is the key at the left of 1, but that's not standard for all the keyboards...) Thanks a million! I need to get some sleep now, will do the patching tomorrow and see whether it's as good as I thought it would be in practice. No, actually I couldn't wait and tested it. Seems to work just as intended. How do I define the backquote key in XK_blah notation? I'm using XK_Tab now and it's actually quite handy too. Thanks again, [a] -- . Antoni Grzymala - antoni (at) chopin.edu.pl ---. | OpenPGP KeyID EB315583 available now from a keyserver near you | | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | `' pgpaqXZbvX4WT.pgp Description: PGP signature
[dwm] nmaster patch
On Thu, Aug 23, 2007 at 12:23:52PM -0400, cr wrote: - i really miss the nmaster feature (i used most of times to have a grid-like layout and be able to use better the vertical space on the left area - I plan to port the clients-per-tag patch soon - for the rest, it looks pretty fine to me as usually :) and nmaster patch? :) Something like attached? Regards, -- Jeroen Schot [EMAIL PROTECTED] (mail jabber) http://schot.a-eskwadraat.nl diff -r 1c30ac0aee7f config.default.h --- a/config.default.h Thu Aug 23 18:15:13 2007 +0200 +++ b/config.default.h Thu Aug 23 23:13:24 2007 +0200 @@ -33,6 +33,7 @@ static Layout layouts[] = { \ { ,floating }, \ }; #define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */ +#define NMASTER1 /* clients in master area */ #define SNAP 32 /* snap pixel */ /* key definitions */ @@ -48,6 +49,8 @@ Key keys[] = { \ { MODKEY, XK_k, focusprev, NULL }, \ { MODKEY, XK_h, setmwfact, -0.05 }, \ { MODKEY, XK_l, setmwfact, +0.05 }, \ + { MODKEY|ShiftMask, XK_h, incnmaster, -1 }, \ + { MODKEY|ShiftMask, XK_l, incnmaster, 1 }, \ { MODKEY, XK_m, togglemax, NULL }, \ { MODKEY, XK_Return, zoom, NULL }, \ { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, \ diff -r 1c30ac0aee7f tile.c --- a/tile.cThu Aug 23 18:15:13 2007 +0200 +++ b/tile.cThu Aug 23 23:20:25 2007 +0200 @@ -5,8 +5,29 @@ /* static */ static double mwfact = MWFACT; +static unsigned int nmaster = NMASTER; /* extern */ + +void +incnmaster(const char *arg) { + int i; + + if(!isarrange(tile)) + return; + if(!arg) + nmaster = NMASTER; + else { + i = atoi(arg); + if((nmaster + i) 1 || wah / (nmaster + i) = 2 * BORDERPX) + return; + nmaster += i; + } + if(sel) + arrange(); + else + drawstatus(); +} void setmwfact(const char *arg) { @@ -32,28 +53,33 @@ setmwfact(const char *arg) { void tile(void) { - unsigned int i, n, nx, ny, nw, nh, mw, th; + unsigned int i, n, nx, ny, nw, nh, mw, mh, th; Client *c; for(n = 0, c = nexttiled(clients); c; c = nexttiled(c-next)) n++; /* window geoms */ - mw = (n == 1) ? waw : mwfact * waw; - th = (n 1) ? wah / (n - 1) : 0; - if(n 1 th bh) + mh = (n = nmaster) ? wah / (n 0 ? n : 1) : wah / nmaster; + mw = (n = nmaster) ? waw : mwfact * waw; + th = (n nmaster) ? wah / (n - 1) : 0; + if(n nmaster th bh) th = wah; nx = wax; ny = way; for(i = 0, c = nexttiled(clients); c; c = nexttiled(c-next)) { c-ismax = False; - if(i == 0) { /* master */ + if(i nmaster) { /* master */ + ny = way + i * mh; nw = mw - 2 * c-border; - nh = wah - 2 * c-border; + nh = mh; + if(i + 1 == (n nmaster ? n : nmaster)) /* remainder */ + nh = wah - mh * i; + nh -= 2 * c-border; } else { /* tile window */ - if(i == 1) { + if(i == nmaster) { ny = way; nx += mw; } diff -r 1c30ac0aee7f tile.h --- a/tile.hThu Aug 23 18:15:13 2007 +0200 +++ b/tile.hThu Aug 23 22:50:14 2007 +0200 @@ -1,6 +1,7 @@ /* See LICENSE file for copyright and license details. */ /* tile.c */ +void incnmaster(const char *arg); /* increments nmaster value */ void setmwfact(const char *arg); /* sets master width factor */ void tile(void); /* arranges all windows tiled */ void zoom(const char *arg);/* zooms the focused client to master area, arg is ignored */
Re: [dwm] GNU screen-like workflow suggestion for dwm.
No, actually I couldn't wait and tested it. Seems to work just as intended. How do I define the backquote key in XK_blah notation? I think it is XK_quoteleft, have a look at X11/keysymdef.h Thanks again, np ;) -- - yiyus || JGL .
Re: [dwm] GNU screen-like workflow suggestion for dwm.
I think it is XK_quoteleft, have a look at X11/keysymdef.h Sorry. It probably works, but keysymdef.h tells XK_quoteleft is deprecated, you should use XK_grave instead. Good night! -- - yiyus || JGL .