From: Juri H. <ju...@fa...> - 2012-04-19 19:24:46
|
On 04/19/12 at 09:19pm, Juri Hamburg wrote: > On 04/19/12 at 09:14pm, Juri Hamburg wrote: > > > Ugh, sorry, copied some crap over :) > > I ment that: Jeez... and the functions. function next_wrap() scr = ioncore.goto_next_screen() if obj_is(scr, "WRootWin") then ioncore.goto_nth_screen(0) end end function prev_wrap() scr = ioncore.goto_prev_screen() if obj_is(scr, "WRootWin") then ioncore.goto_nth_screen(-1) end end > > defbindings("WScreen", { > bdoc("Go to next/previous screen on multihead setup."), > kpress(META.."Shift+comma", "prev_wrap()"), > kpress(META.."Shift+period", "next_wrap()"), > }) > > > > > How about this? > > > > defbindings("WScreen", { > > bdoc("Move current workspace left/right."), > > kpress(META.."Shift+comma", "WScreen.dec_index(_, _sub)", "_sub:non-nil"), > > kpress(META.."Shift+period", "WScreen.inc_index(_, _sub)", "_sub:non-nil"), > > }) > > > > > > On 04/19/12 at 07:01pm, Philipp Hartwig wrote: > > > If you only have two screens you can also do something completely trivial like > > > kpress(META.."Tab", "ioncore.goto_nth_screen(1-WScreen.id(_))"), > > > in the WScreen section. Or if one has N screens, one could do > > > kpress(META.."Tab", "ioncore.goto_nth_screen((WScreen.id(_)+1)%N)"), > > > > > > Or one writes a small function which saves WScreen.id(_), calls > > > ioncore.goto_next_screen, compares the return value to the saved value and > > > switches to the 0-th screen if the value hasn't changed. There's really an > > > infinite number of possibilities using only Lua. :) Certainly one can also > > > determine the N above dynamically. > > > > > > But the main point is that you find some way of doing this that suits your use > > > case. :) > > > > > > Regards, > > > Philipp > > > > > > ------------------------------------------------------------------------------ > > > For Developers, A Lot Can Happen In A Second. > > > Boundary is the first to Know...and Tell You. > > > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > > > http://p.sf.net/sfu/Boundary-d2dvs2 > > > _______________________________________________ > > > Notion-general mailing list > > > Not...@li... > > > https://lists.sourceforge.net/lists/listinfo/notion-general > > > > -- > > Juri Hamburg > > GnuPG Key-ID: 0x67206E72 > > > > > ------------------------------------------------------------------------------ > > For Developers, A Lot Can Happen In A Second. > > Boundary is the first to Know...and Tell You. > > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > > http://p.sf.net/sfu/Boundary-d2dvs2 > > > _______________________________________________ > > Notion-general mailing list > > Not...@li... > > https://lists.sourceforge.net/lists/listinfo/notion-general > > > -- > Juri Hamburg > GnuPG Key-ID: 0x67206E72 > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Notion-general mailing list > Not...@li... > https://lists.sourceforge.net/lists/listinfo/notion-general -- Juri Hamburg GnuPG Key-ID: 0x67206E72 |