TrianguloY

now browsing by tag

 
 

About the ‘how to have a ➕ desktop’

About the ‘how to have a ➕ desktop’

As Lukas said implementing this from a script can be tricky and will result in a long and complex script due to the personalization the launcher has.

However I though a way to implement this with a relatively very short script that has limitations and very specific instructions that you must follow, but If you follow them (and they are not so strange) it should work correctly. It can be also a start point in case someone want to improve it and make it more ‘universal’

The instructions are:

Set the script to run in the position change event of a container.

Place items that will be the ‘prohibited’ zones (in the video the red ones) that need to have those properties:

Properties of the barrier items:

Label set to “barrier” (this can be changed from script if necessary).

Scale set to 1,1 and skew and rotation to 0.

[Note that it is not necessary to have a red background, but it helps visualizing].

Caveats:

If you enable diagonal scrolling it won’t slide when touching a barrier, it will simply stop. Consider not using diagonal scrolling.

If you enter exit edit mode while a barrier is on view it will jump to the previous saved position, or not move at all if there is no saved one. Consider exiting edit mode always in a ‘valid’ position.

If there are a lot of items in the container it may lag.

With seamless mode it won’t necessarily work as expected. Consider duplicating the barriers yourself if necessary.

Improvements that can be made (for scripters)

Save the barrier’s rects instead of calculating them each time.

Slide instead of stopping when diagonal scrolling is on.

Use also the scale of barriers and maybe even rotation and skew.

Make it valid with seamless mode.

]]>

This is a suggestion, but maybe there is currently a way to do this and I didn’t found it yet (If that’s the case…

This is a suggestion, but maybe there is currently a way to do this and I didn’t found it yet (If that’s the case tell me! )

An item.bringToView() function that will scroll/open/change all necessary containers so that the item is visible on the screen (more exactly ‘inside the screen view’, maybe it is behind something and you can’t see it but you get the idea)

Technically the effect I’m looking for is the same as when you click the pencil button of an item in the hierarchy menu, but without entering edit mode (but if it’s easier entering it I’m ok with it)

I know you can go to the desktop, open the necessary folders and scroll to the places where it needs to. But lightning already does this.

The effect I want is a script that, with the id of a item, can do ‘here you have that item’ and so the user can find items easily from script (as I said, like the hierarchy menu)

]]>

A script with only three characters that crashes lightning:

A script with only three characters that crashes lightning:

/{/

It seems that regexp Pattern exceptions are not caught, and directly crashes lightning (the app log outputs the error)

But a more strange thing is that, if you create a shortcut to launch this script nothing happens(nor even in the log), but if you run it from an item/container/customMenu then it crash.

]]>

widget columns

widget columns

Maybe you remember a video of my home screen one year ago. There I showed this script in action, however it had a workaround for a problem lightning had in the past, you couldn’t specify a custom bounding box.

Since one or two version before the current one, this is now possible. I planned to release this some months ago, but in the end I encounter another problem, and I couldn’t post it.

Now it’s time to do so.

The instructions to set it up are relatively simple: in a container (I recommend a panel) with the widgets detached, run the script from items/events specifying those script data:

zoom – to decrease the number of columns

unzoom – to increase the number of columns

1 (or any other positive integer) – to set exactly that number of columns

0 (or any other negative number) – to recalculate without changing the current number of columns

Don’t specify a data and it will update only the bounding box

I recommend to run the script from the resumed event of the container without data. This will ensure the bounding box is always the good one.

Notes:

Only widgets will be moved, if you need to change this edit the script.

The script has a little borders configuration that you can modify to your needs (in the video I have borders set)

You can also specify the velocity and frequency of the animation.

]]>

This is a binding to get the same result as the dynamic calendar icon script, but now from a binding in the dummy…

This is a binding to get the same result as the dynamic calendar icon script, but now from a binding in the dummy property (an alternative way, can’t tell which one is better).

The instructions are the same as the old script (http://www.lightninglauncher.com/wiki/doku.php?id=script_dynamic_calendar_icon) but now you can simply use lightning variables to set it to show the day or the month ( $ll_day or $ll_month respectively)

http://www.lightninglauncher.com/wiki/doku.php?id=script_dynamic_calendar_icon
]]>

A new version of the repository importer app is now live.

A new version of the repository importer app is now live.

It mainly fixes the error when importing scripts of ‘cutting lines’ and also is now updated to android 6.0

But also there is now a new way of sending crash reports, no email is needed (but recommended) and can be configured to send them automatically or never send them.

Hope there are no big bugs on this version, but if they are, now is easier to report them 🙂

Oh, and happy holidays everyone!

]]>

This is a crash due to multi tapping.

This is a crash due to multi tapping.

Maybe there are more bugs and crashes when using two fingers, I’ll post them if I find more:

Just go to edit mode (make sure snap is disabled), select an item, and while moving it with one finger enable snap with another.

Just after you release the item, crash.

]]>

Suggestions about the new ability to draw directly an icon:

Suggestions about the new ability to draw directly an icon:

What about a way to get/draw the original icon? (keep reading)

In my shine icons test (https://plus.google.com/105066926163073195690/posts/iUdNtvtcfcp) I’m drawing an effect above the current icon. The new imageScript feature is perfect for drawing custom icons without extra bitmaps, but it is also perfect for making effect to current icons. The issue is that I need to get the original icon (CustomIcon or OriginalIcon if the custom is null) and in that test I’m keeping a reference of that bitmap, which I’m sure is inefficient. Is getting the icon each time better or even worse?

Anyway I want to suggest three different ways to handle this:

#1: an ImageScript.DrawingContext#drawOriginal() function which will draw the corresponding icon with the colorize color, reflection and all that, so the image script can draw before and after it.

#2: an ImageScript.DrawingContext#getOriginalBitmap() which will return the bitmap that should have been drawed (what the previous suggestion will directly draw, but now returned as a bitmap)

I thing this is not a good suggestion, the extra bitmap is what we want to avoid.

#3: two more functions in the ImageScripts objects: drawAfter and drawBefore that will be the same as draw but one before it and the other after. The difference is that if there is no draw function, the original icon (as I described before) will be draw instead. This allow to: the current ‘override the drawing'( only a draw function) and what I want to make effects in the original icon (drawAfter and/or drawBefore, but no draw).

]]>

Comments and suggestions about the improvements in the script editor:

Comments and suggestions about the improvements in the script editor:

– Now you can fling and it won’t stop after releasing the finger, nice.

– Now when you scroll far enough so the cursor goes out of screen, previously the cursor were moved, and now it doesn’t. Even more: when you start writing the view is scrolled automatically to show the cursor. Just perfect, thanks!

However:

– Previously when you used a keyboard with arrows, when moving the cursor to lines out of screen, the view was automatically scrolled so that the cursor was always in the screen. Now the cursor simply disappear, and it is moving correctly but out of view. I would prefer if possible to scroll the view so that the cursor is visible in this situation.

– Another place where this can be a problem is when selecting text (when you long tap and two cursors are shown with the middle text selected). Previously when you moved one of those cursor to the top/bottom of the screen, the view was automatically scrolled and it was easy to select big chunks of text. Now it is not scrolled so you need to move the cursor, scroll, move the cursor, scroll, etc.

To sum up: when you scroll, the cursor should keep it’s position (being visible or not)

When you move the cursor or write something, the view should scroll so that the cursor is always visible.

]]>

From the author of the ‘variable editor’ here comes the binding dictionary yay!

From the author of the ‘variable editor’ here comes the binding dictionary yay!

The idea behind this script was a simple one: allow to organize a bit the bindings and have them stored for multiple use. Then I started adding features, tweaking menus… ~600 lines of code at the end (almost half of them are empty, but impressive nonetheless).

How to use it:

– simply run it and choose what you want to do. Check the features for more information.

Features:

– Add bindings directly from text, writing/pasteing them.

– Add binding from the current item (you need to run the script from an item)

– Add all bindings on the launcher: this will search all bindings from all items from the launcher to save them (will ask one by one without duplicates)

– Rename a saved binding

– See/Edit/Delete a saved binding

– Set a saved binding to the current item (you need to run the script from an item) at a chosen property.

Configuration:

– You can change the folder where the data (the bindings) are saved.

Notes:

– When choosing a property, VOID means DUMMY

– Editing the bindings folder from outside will only take effect after restarting the script (and is recommended to not do it while the script is running)

– You can remove/add/edit manually the files without problem (if you don’t do strange things). You can make a copy, delete all at once, add some, etc

Important:

– Due to the complexity of the script, it may contain bugs. If you find one don’t be afraid of tell me in the comments.

]]>