TrianguloY​

TrianguloY​

Can you please upgrade your script for skip locked screen? I mean add new option for skip floating desktop too…

]]>

8 Commentsto TrianguloY​

  1. Anonymous says:

    < ![CDATA[

    Currently there is no way to know the current floating desktop.


    Pierre Hébert​: is it somewhere and I missed it or should I ask for it as a suggestion?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    There is no “official” way but you can extract the desktop id by reading the value of the “overlayScreen” field in the JSON global config file

    ]]>

  3. Anonymous says:

    < ![CDATA[

    That’s a solution, but a bit ‘advanced’.


    What about LL.getFloatingDesktop() ?

    ]]>

  4. Anonymous says:

    < ![CDATA[

    TrianguloY​ Pierre Hébert​ if exist ll.getLockscreenDesktop(), your idea is good…

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Maybe I will add this method (although the right way would be to offer a way to read (and maybe write) the global configuration properties).

    ]]>

  6. Anonymous says:

    < ![CDATA[

    TrianguloY in 12.7.b5 is now ll.getLockscreenDesktop() can you upgrade your script? thx

    ]]>

  7. Anonymous says:

    < ![CDATA[

    I couldn’t test it, could you do it?


    ———————-






    /* config */



    var skip_LockScreen = true;


    var skip_Floating = true;



    /* end config */



    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 floatingid=LL.getFloatingDesktop();


    if(floatingid!=null)floatingid=floatingid.getId();



    var p=0;


    for(var t=0;t


    var id=desktopsarray.getAt(t);


    if(id==currentid){


    currentat=p;


    }else{


    if(skip_LockScreen && id==lockscreenid)continue;


    if(skip_Floating && id==floatingid)continue;


    }


    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]);

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Yes, for me working good. I tested, if i have both, if have only lockedscreen, if have only floating desktop, if i dont have both. You can public in repository… Thanks

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *