Re: [dwm] faster focus to client
I have found an useful tip related to this idea, if you are using the patch I submitted yesterday (or any of the previous versions) to see the previous tags when you try to see the currently selected tags. I'll explain it with an example: you have clients with tags 1, 2 and 3, and you are viewing these three tags. Now, if you press Mod1+1 twice you will be focusing the first client with tag 1, if you press Mod2+2 twice you will be focusing the first client with tag 2, etc. This way, if you define enough tags in your config.h for the clients that you want to access quickly, you can focus them with just two key strokes. You can do it now with Mod1+Tab, but it is a bit less comfortable. As a side note, I have always wanted to give it a try to dynamic tags in dwm, and I will probably write a patch once 5.0 is released, just to see how it feels. OTOH, I think the needed complexity won't be well worth, but let's see... hth, -- - yiyus || JGL .
Re: [dwm] faster focus to client
On Fri, Apr 18, 2008 at 01:28:13AM +0200, yy wrote: > 2008/4/17, pancake <[EMAIL PROTECTED]>: > > What do you think about this feature? I think that could be really > > interesting. > > > > When you have lot of windows opened it's mostly tedious to focus a desired > > window > > with the keyboard. So why not tag windows with a key and make them > > accessible > > in a faster way? > > > > My idea is to create this code structure: > > > > void tagclient(char *); > > void focustag(char *); > > > > You can setup a keybinding for each function and then store a single char > > inside > > the Client structure to make it accessible with it. And we can also use > > the title > > of the window or a property like floating for selecting the next client to > > be > > focused. > > > > For example. Doing focustag(""); we will toggle between the first client > > in the > > list of the selected tags that are floating and non-floating clients. Like > > in wmii :) > > > > If we call clienttag("M"); we will focus the client tagged as 'M' or with > > a title > > name starting with 'M' like mplayer. > > > > Another possibility is to call clienttag("-") and make dwm capture the > > next key > > pressed and use it as argument focus it. > > > > I don't really think this is a good design concept, but derivated ideas > > are welcome! > > > > > > > > > > > > --pancake > > > > > > Well, we have already got tags in dwm, I don't think we need more. As > a simple solution, you could just add this to the end of view() (you > will need to declare c too): > for(c = clients; c && !c->tags[idxoftag(arg)]; c = c->next); > focus(c); > And you could have tags for lots of letter in your keyboard. I never > lose windows (I don't use many of them, and I focus mostly with the > mouse), but I understand it can be a problem for some people. Of > course, it wouldn't always work with my patch to view the previous > tags, but you get the idea. > Another option is having this in config.h: > { MODKEY|ShiftMask, XK_j, > focusnext, NULL }, > { MODKEY|ShiftMask, XK_j, > focusnext, NULL }, > { MODKEY|ShiftMask, XK_j, > focusnext, NULL }, > { MODKEY|ShiftMask, XK_j, > focusnext, NULL }, > so you can advance several clients with only one key stroke. There has been a similiar approach which I had in mind for 4.7 already, but for some reasons it has been delayed. Due the fact that we can view multiple tags, the idea was to implement two two additional focus-functions which focus the next/prev client with exactly the same tag(s) of the current client, which are bound to the Mod1-Shift-{j,k}. I reconsider this now for dwm-5.0. Kind regards, -- Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Re: [dwm] faster focus to client
2008/4/17, pancake <[EMAIL PROTECTED]>: > What do you think about this feature? I think that could be really > interesting. > > When you have lot of windows opened it's mostly tedious to focus a desired > window > with the keyboard. So why not tag windows with a key and make them accessible > in a faster way? > > My idea is to create this code structure: > > void tagclient(char *); > void focustag(char *); > > You can setup a keybinding for each function and then store a single char > inside > the Client structure to make it accessible with it. And we can also use the > title > of the window or a property like floating for selecting the next client to be > focused. > > For example. Doing focustag(""); we will toggle between the first client in > the > list of the selected tags that are floating and non-floating clients. Like > in wmii :) > > If we call clienttag("M"); we will focus the client tagged as 'M' or with a > title > name starting with 'M' like mplayer. > > Another possibility is to call clienttag("-") and make dwm capture the next > key > pressed and use it as argument focus it. > > I don't really think this is a good design concept, but derivated ideas are > welcome! > > > > > > --pancake > > Well, we have already got tags in dwm, I don't think we need more. As a simple solution, you could just add this to the end of view() (you will need to declare c too): for(c = clients; c && !c->tags[idxoftag(arg)]; c = c->next); focus(c); And you could have tags for lots of letter in your keyboard. I never lose windows (I don't use many of them, and I focus mostly with the mouse), but I understand it can be a problem for some people. Of course, it wouldn't always work with my patch to view the previous tags, but you get the idea. Another option is having this in config.h: { MODKEY|ShiftMask, XK_j, focusnext, NULL }, { MODKEY|ShiftMask, XK_j, focusnext, NULL }, { MODKEY|ShiftMask, XK_j, focusnext, NULL }, { MODKEY|ShiftMask, XK_j, focusnext, NULL }, so you can advance several clients with only one key stroke. hth, -- - yiyus || JGL .
[dwm] faster focus to client
What do you think about this feature? I think that could be really interesting. When you have lot of windows opened it's mostly tedious to focus a desired window with the keyboard. So why not tag windows with a key and make them accessible in a faster way? My idea is to create this code structure: void tagclient(char *); void focustag(char *); You can setup a keybinding for each function and then store a single char inside the Client structure to make it accessible with it. And we can also use the title of the window or a property like floating for selecting the next client to be focused. For example. Doing focustag(""); we will toggle between the first client in the list of the selected tags that are floating and non-floating clients. Like in wmii :) If we call clienttag("M"); we will focus the client tagged as 'M' or with a title name starting with 'M' like mplayer. Another possibility is to call clienttag("-") and make dwm capture the next key pressed and use it as argument focus it. I don't really think this is a good design concept, but derivated ideas are welcome! --pancake