**This is an old revision of the document!** ----
====== About the script ====== * Purpose : This script lets you change between desktops without entering the lockscreen one * Author : [[https://plus.google.com/u/1/105066926163073195690|TrianguloY]] ====== How to use the script ====== Set the script in the two fingers swipe left and two fingers swipe right event in general settings. Won't work from another different event. If you want to go to the lock screen, use a shortcut or go to settings, configure desktops, long click the one you want to go to. ====== Script code ====== <sxh javascript> var desktopsarray=LL.getAllDesktops(); var desktops=[]; var currentid=LL.getCurrentDesktop().getId(); var currentat=-1; var lockscreenid=LL.getLockscreenDesktop(); if(lockscreenid!=null)lockscreenid=lockscreenid.getId(); var p=0; for(var t=0;t<desktopsarray.getLength();++t){ var id=desktopsarray.getAt(t); if(id==lockscreenid)continue; if(id==currentid)currentat=p; desktops[p++]=id; } var source=LL.getEvent().getSource(); if(source=="C_SWIPE2_RIGHT"){ currentat=(currentat+1)%desktops.length; }else if(source=="C_SWIPE2_LEFT"){ currentat=(currentat-1+desktops.length)%desktops.length; }else{return} LL.goToDesktop(desktops[currentat]); </sxh>