From: Philipp H. <ph...@ph...> - 2012-04-19 17:01:29
|
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 |