* [9fans] plan9port rio and keyboard shortcuts @ 2012-07-10 9:26 Rudolf Sykora 2012-07-10 9:35 ` Federico Benavento ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Rudolf Sykora @ 2012-07-10 9:26 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Hello, In p9p's rio there is a possibility to cycle over windows with left_alt-tab. Has anyone thought about / managed to add some more shortcuts, e.g. such that would run a program like dmenu? (Do you start all your programs from a terminal?) Thanks Ruda ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] plan9port rio and keyboard shortcuts 2012-07-10 9:26 [9fans] plan9port rio and keyboard shortcuts Rudolf Sykora @ 2012-07-10 9:35 ` Federico Benavento 2012-07-10 16:31 ` John Floren 2012-11-05 15:15 ` Christian Neukirchen 2 siblings, 0 replies; 8+ messages in thread From: Federico Benavento @ 2012-07-10 9:35 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs cinap has a patch for that in /n/sources/contrib/cinap_lenrek/rio.c, I don't remember the scapes, I think it was ^n or ^m. On Jul 10, 2012, at 6:26 AM, Rudolf Sykora wrote: > Hello, > > In p9p's rio there is a possibility to cycle over windows with left_alt-tab. > Has anyone thought about / managed to add some more shortcuts, e.g. > such that would run a program like dmenu? > (Do you start all your programs from a terminal?) > > Thanks > Ruda > --- Federico G. Benavento benavento@gmail.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] plan9port rio and keyboard shortcuts 2012-07-10 9:26 [9fans] plan9port rio and keyboard shortcuts Rudolf Sykora 2012-07-10 9:35 ` Federico Benavento @ 2012-07-10 16:31 ` John Floren 2012-11-05 13:53 ` Rudolf Sykora 2012-11-05 15:15 ` Christian Neukirchen 2 siblings, 1 reply; 8+ messages in thread From: John Floren @ 2012-07-10 16:31 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Tue, Jul 10, 2012 at 2:26 AM, Rudolf Sykora <rudolf.sykora@gmail.com> wrote: > Hello, > > In p9p's rio there is a possibility to cycle over windows with left_alt-tab. > Has anyone thought about / managed to add some more shortcuts, e.g. > such that would run a program like dmenu? > (Do you start all your programs from a terminal?) > > Thanks > Ruda > I put some additional keyboard functionality into w9wm at one point, it's not that hard. Look at /usr/local/plan9/src/cmd/rio/key.c:44, figure out what key presses you want to handle, then do a fork+exec or whatever floats your boat. You might also find 9menu handy, although personally I don't like using it in p9p rio because rio doesn't pass focus clicks through to the client, meaning I have to click twice (annoying). I just use a terminal to start programs. I'm using p9p rio right now, but that's because I cycle through about a half-dozen window managers a year in search of WM nirvana. I love using rio on Plan 9, but I'm not entirely convinced it is best-suited for the way I use Unix. Some day I may write my own WM, but today is not that day. john ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] plan9port rio and keyboard shortcuts 2012-07-10 16:31 ` John Floren @ 2012-11-05 13:53 ` Rudolf Sykora 2012-11-05 14:49 ` Kurt H Maier 0 siblings, 1 reply; 8+ messages in thread From: Rudolf Sykora @ 2012-11-05 13:53 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 10 July 2012 18:31, John Floren <john@jfloren.net> wrote: > On Tue, Jul 10, 2012 at 2:26 AM, Rudolf Sykora <rudolf.sykora@gmail.com> wrote: >> Hello, >> >> In p9p's rio there is a possibility to cycle over windows with left_alt-tab. >> Has anyone thought about / managed to add some more shortcuts, e.g. >> such that would run a program like dmenu? >> (Do you start all your programs from a terminal?) >> >> Thanks >> Ruda >> > > I put some additional keyboard functionality into w9wm at one point, > it's not that hard. Look at /usr/local/plan9/src/cmd/rio/key.c:44, > figure out what key presses you want to handle, then do a fork+exec or > whatever floats your boat. Ok. For anyone interested, I changed my p9p rio key.c: *** key.c_orig 2012-11-03 18:59:41.040071847 +0100 --- key.c 2012-11-04 10:41:27.853606153 +0100 *************** *** 30,39 **** --- 30,43 ---- { int i; int tabcode = XKeysymToKeycode(dpy, XK_Tab); + int tcode = XKeysymToKeycode(dpy, XK_t); + int rcode = XKeysymToKeycode(dpy, XK_r); for(i=0; i<num_screens; i++){ XGrabKey(dpy, tabcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); XGrabKey(dpy, tabcode, Mod1Mask|ShiftMask, screens[i].root, 0, GrabModeSync, GrabModeAsync); + XGrabKey(dpy, tcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); + XGrabKey(dpy, rcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); /* XGrabKey(dpy, pgupcode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); */ /* XGrabKey(dpy, pgdowncode, Mod1Mask, screens[i].root, 0, GrabModeSync, GrabModeAsync); */ /* XGrabKey(dpy, altcode, 0, screens[i].root, 0, GrabModeSync, GrabModeAsync); */ *************** *** 47,54 **** --- 51,69 ---- * process key press here */ int tabcode = XKeysymToKeycode(dpy, XK_Tab); + int tcode = XKeysymToKeycode(dpy, XK_t); + int rcode = XKeysymToKeycode(dpy, XK_r); + if(e->keycode == tabcode && (e->state&Mod1Mask) == (1<<3)) alttab(e->state&ShiftMask); + if(e->keycode == tcode && (e->state&Mod1Mask) == (1<<3)) { + if(fork() == 0) + execl("/home/ruda/bin/xt", "xt", (char *) 0); + } + if(e->keycode == rcode && (e->state&Mod1Mask) == (1<<3)) { + if(fork() == 0) + execl("/usr/local/bin/dmenu_run", "dmenu_run", (char *) 0); + } XAllowEvents(dpy, SyncKeyboard, e->time); } which now opens xterm (xt is my xterm with unicode locale on) on pressing alt-t and runs dmenu_run (related to dwm) on alt-r. I missed these two shortcuts heavily. (warning: I just added the lines by means of observation; I do not really know what stands behind those XGrabKey and alike functions. Nonetheless it now does what I want.) Also I want to ask if someone noticed that p9p rio for some reason precludes e.g. shuffling of firefox' tabs (both within one window and between windows). Running twm instead of rio helps in this respect. Ruda ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] plan9port rio and keyboard shortcuts 2012-11-05 13:53 ` Rudolf Sykora @ 2012-11-05 14:49 ` Kurt H Maier 2012-11-05 14:53 ` cinap_lenrek 0 siblings, 1 reply; 8+ messages in thread From: Kurt H Maier @ 2012-11-05 14:49 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Tue, Jul 10, 2012 at 2:26 AM, Rudolf Sykora <rudolf.sykora@gmail.com> wrote: > Hello, > > In p9p's rio there is a possibility to cycle over windows with left_alt-tab. > Has anyone thought about / managed to add some more shortcuts, e.g. > such that would run a program like dmenu? This breaks nested rio. > (Do you start all your programs from a terminal?) Yes, since the program takes over the window anyway. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] plan9port rio and keyboard shortcuts 2012-11-05 14:49 ` Kurt H Maier @ 2012-11-05 14:53 ` cinap_lenrek 2012-11-05 15:36 ` Kurt H Maier 0 siblings, 1 reply; 8+ messages in thread From: cinap_lenrek @ 2012-11-05 14:53 UTC (permalink / raw) To: 9fans this is plan9*port* rio, a X11 window manager. no nesting with plan9 themed ubuntu linux here. -- cinap ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] plan9port rio and keyboard shortcuts 2012-11-05 14:53 ` cinap_lenrek @ 2012-11-05 15:36 ` Kurt H Maier 0 siblings, 0 replies; 8+ messages in thread From: Kurt H Maier @ 2012-11-05 15:36 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Mon, Nov 05, 2012 at 03:53:59PM +0100, cinap_lenrek@gmx.de wrote: > this is plan9*port* rio, a X11 window manager. no > nesting with plan9 themed ubuntu linux here. > Oh, gross. Never mind. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [9fans] plan9port rio and keyboard shortcuts 2012-07-10 9:26 [9fans] plan9port rio and keyboard shortcuts Rudolf Sykora 2012-07-10 9:35 ` Federico Benavento 2012-07-10 16:31 ` John Floren @ 2012-11-05 15:15 ` Christian Neukirchen 2 siblings, 0 replies; 8+ messages in thread From: Christian Neukirchen @ 2012-11-05 15:15 UTC (permalink / raw) To: 9fans rudolf.sykora@gmail.com (Rudolf Sykora) writes: > Hello, > > In p9p's rio there is a possibility to cycle over windows with left_alt-tab. > Has anyone thought about / managed to add some more shortcuts, e.g. > such that would run a program like dmenu? > (Do you start all your programs from a terminal?) It is probably much easier to use xbindkeys for that. http://www.nongnu.org/xbindkeys/xbindkeys.html > Thanks > Ruda -- Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-05 15:36 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-07-10 9:26 [9fans] plan9port rio and keyboard shortcuts Rudolf Sykora 2012-07-10 9:35 ` Federico Benavento 2012-07-10 16:31 ` John Floren 2012-11-05 13:53 ` Rudolf Sykora 2012-11-05 14:49 ` Kurt H Maier 2012-11-05 14:53 ` cinap_lenrek 2012-11-05 15:36 ` Kurt H Maier 2012-11-05 15:15 ` Christian Neukirchen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).