Hi.

Hi.

I have a few questions:

1.- I have an issue with LL+KLWP. When I am in the first LL desktop the shortcuts from my KLWP wallpaper do work but not in any other desktop, even if I set them as the home. Only the first original desktop from the five I have (three of them are empty) works, even if it isn’t currently the first in the list from Settings->Lightning->Configure Desktop.

2.- Is there any way to get the number of page in a desktop?. I use global gestures for using with KLWP and I’d like to work differently depending on the page I am, so I need for that the page number.

3.- Also, not a problem but is the main reason I want to use LL, and being a beginner I don’t know how to start. I want to have a scrollable dock with different icon bitmaps depending on a Tasker context, similar of what I’ve already done (non scrollable) for the desktop with KLWP. This would need to be able to change an icon bitmap (12 icons actually) depending on a Tasker variable which links to a image file in the sd. As far as I know I don’t see how to do it, because in Bindings->Property there is nothing to change the icon itself.

Is Javascript neccessary? and if so, could you tell me how to do it?, maybe not the entire code but some key bits, like the object or method to get/set the bitmap. I have a bit of experience with JS in Tasker but I’m a noob in general.

The nearest example I’ve seen in the wiki is:

var i = LL.getCurrentDesktop().getItemByLabel(“some item”).getDefaultIcon();

LL.getEvent().getItem().setDefaultIcon(i);

I’d execute the script from Tasker (for better managing which images are loaded) 12 times, one for each icon in the dock or maybe only once with a loop within the script. The final result I think should be something like this:

var new_image = XXXXXXXX.getImage(““);

LL.getCurrentDesktop().getItemByLabel(“dock_01”).setDefaultIcon(new_image);

Thx in advance.

]]>

7 Commentsto Hi.

  1. Anonymous says:

    < ![CDATA[

    Solved point 3:



    var img = LL.createImage(path_to_image);


    LL.getCurrentDesktop().getItemByLabel(“test1”).setCustomIcon(img);

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Regarding 1, maybe the “tap on empty space” event is not set on the “wallpaper tap” action for other desktops. This is needed to establish a link between the launcher and the live wallpaper.



    To get the number of pages you can get the current scroll position using Container.getPositionX() and getPositionY() (and possibly getPositionScale() if using zoom), and compare the current position with the size of the container (Container.getWidth(), getHeight() and possibly getBoundingBox())



    For 3 you may also use several stacked items and toggle their visibility using a binding, but that’s only convenient if the number of images is low (3, maybe 4, not more), otherwise your scripted solution is better.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    1 – Thx, that’s it. I did’t realize General->Events&Actions is different for each desktop and also got confused with Properties->Events in layout mode.


    2 – Not tested yet but I count on this working when I put my hands on it.


    3 – Yep, I tried that just between my initial and second post. That’s how I did it at first for KLWP. I’d prefer a self-contained setup but the toll is too heavy, as I have right now 16-19 sets of 12 icons in two different wallpapers (I will end probably with around 10 sets), and that’s why I wanted the icons to be linked to external files, planning ahead to do the same with KLWP (no JS required in this case).



    Also a couple more questions:


    4 – How can I set the home page in each desktop?.



    5 – In my test setup of LL, when I add the Script Editor shortcut it doesn’t launch the actual editor, it just shows a menu with Fast Run Tool and Lightning Settings. I just realized now because is the only way I’ve been using with scripts (besides binding events), but in older backups (from when I wasn’t yet into scripts) it does work.



    It’s not much of a problem because I will start from scratch when I finally start to build my final setup but is somewhat annoying.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Pierre Hébert re 1, don’t all desktops inherit the same event settings when they are set at the general level? It sounds like Tony Montana​ might have made the changes in the desktop settings events instead of at the top of the hierarchy.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Carolyn Boyle


    But I didn’t set anything. The first desktop simply have some events (like tap on empty space) set in the config by default and other desktops don’t.



    Now KLWP works in two of the desktops but not in the other three, because I have no need to configure them for now. If I’m not mistaken there is no hierarchy at all.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Tony Montana there is definitely a hierarchy. You can view it easily in edit mode by clicking the button that’s just too the left of the button in the lower right corner. This is a really handy way of accessing items.



    What I was trying to say before is that, if the action is set in lightning settings it should be inherited by every single desktop and you shouldn’t have to change it at the desktop level. If you make the change in desktop settings, it should only apply to that individual desktop. Does that make sense?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Carolyn Boyle


    Yes, of course there is a hierarchy (desktop, panel, icons, …) but I meant to say all desktops are at the same level, without dependencies between them.



    I think I get your point, two different screen settings for desktops: one for the current desktop and other as a global settings desktop. But knowing how it works right now I don’t mind the way it is. I simply don’t change desktop setting that often to be a concern.



    The only issue maybe is that when you enter desktop settings, because you exit the edit layout screen you can get the impression you are now outside local-desktop settings, but you are not. Is actually a bit confusing (as for myself) but I don’t see any real problem.

    ]]>

Leave a Reply

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