TrianguloY

now browsing by tag

 
 

Script ‘Fix for Oreo app drawer not refreshed on LL 14.2’

Script ‘Fix for Oreo app drawer not refreshed on LL 14.2’

Important!

This is a script to fix the bug ‘apps are not updated on the app drawer automatically’. This happens on Android Oreo and above with LL version 14.2. If you don’t use Oreo or you are reading this from the future when a new LL version is available (to be more precise: if when you install a new app it is added automatically to the app drawer) then you do NOT need this script. Otherwise, if you have the mentioned bug, keep reading.

On Android Oreo the way to detect installed/uninstalled/updated apps was changed. Previously any app could register to a broadcast that was sent when a package was installed, uninstalled or updated. Since Oreo that feature was removed and the broadcast isn’t sent. There are two ways to fix this: register to the broadcast while the app is running (it will be lost if the app closes…and personally couldn’t make it work) or use a new function that tells you which packages were updated since a previous call.

I could make this second way work, with some caveats, but under normal circumstances it should work.

When running the script below the app drawer will be updated. It requires manual calling but it is fast so I recommend setting the script to run on the RESUMED event of the app drawer. This way when opening it will be updated.

Known bugs: when the device is restarted (turn off/on) the list is cleared, so if you install/uninstall an app and then restarts without running the script, that app won’t be updated correctly. Remember you can use the ‘refresh’ function from the app drawer to fix this.

Also, keep in mind this is a temporary fix that can have unknown bugs or work incorrectly on some devices/versions. Make a backup first!!! (just in case).

Comment anything you found, and if you know how to fix something or make the script more reliable don’t hesitate to do so and share!

To recap: make a backup, set this script to run in the resumed event of the app drawer, and keep in mind you will probably need to refresh after a device restart.

]]>

Recently I’ve been thinking about making an official Lightning Launcher Discord (https://discordapp.com/) because I…

Recently I’ve been thinking about making an official Lightning Launcher Discord (https://discordapp.com/) because I think it could revive this a bit (google+ is almost as dead as LL, unfortunately). Of course it will need Pierre’s permission.

I don’t have experience in running a Discord server (I’m an user of some, but not admin) so feel free to share your thoughts. The admins will be the same as here (if they want of course) and maybe in the future more will be promoted. We can take advantage to the fact this is not very active, and check how things go. Perhaps even it will help when Pierre comes back.

As I said this is just an idea, it doesn’t necessarily mean it will be done, but I just wanted to share it and see what do you think.

]]>

Fix Oreo icons

Fix Oreo icons

This script was created to fix the ‘items without icons on android Oreo’ bug until Pierre implements it.

The script sets the adaptive icons of the shortcuts apps that uses them, unsupported on lighting 14.2b1.

This script ONLY WORKS on android Oreo.

Configuration:

You can change the roundness of the icons changing the ROUNDVAL value on the first line of the script. A value of 0 means no round, aka square. A value of 1 means all round, aka circle. Any value inbetween makes a rounded square. Also, a value of -1 uses the system default shape (whatever that is).

By default 0.35 because I find that good enough.

You can also change the relative size of the inner icon by changing the ZOOM value. A value of 1 means no scale, but the icon is very small. A value of 2 make the icon double size, but it is too big. Any other value correspond to the specified scale.

By default 1.25 because that seems the best size for me.

How to use:

After copying it and paste as a new script in the script editor REMEMBER to enable the lighting menu and item menu categories (swipe from the left). Then you can:

Run from an item to change that item’s icon. If the icon already have a custom icon it will ask to override.

Run from a container to change all item’s icon from that container and subcontainers recursively. It will ask to override custom icons or not.

Run from any other event to change items’s icons from that container recursively without asking for overriding (won’t override). Use this for automation.

If you have any issues write a comment and I’ll try to help. Also if you want to improve the script feel free to do so and share it! A mention is just enough.

]]>

File manager

File manager

This script started as a request (https://plus.google.com/+JaroslavGrochal/posts/2CRLTSe588K), but it is usable and maybe useful, so I’m sharing it as a separate post.

The script populates a panel with the files of a specified folder. You can launch the files and navigate opening folders or going ‘up’ the folder hierarchy.

It also lets you create new empty files and folders.

If someone want to improve it, here are a list of features currently unsupported but that will be a good addition: custom menu when long tapping, ability to delete items, custom icons for non-folder files, ability to create bookmarks and save the current path as a variable (or display it somewhere). And also a bit of optimization, the current script is optimized but can be a bit slow with folders with many items.

To set it up create a panel somewhere and check it’s id (long tap the panel, and the menu should say “Panel #00001a”, the id is ‘1a’) Then write this id on the script using the 0x prefix (second line: var containerId=0x1a) and change the default path if you want.

Important! The panel will be filled with the items. All things inside will be removed when the script runs.

I also highly recommend changing some properties of the panel: one column, 10-15 rows, disable snap to pages, enable scroll as far as the items go and set labels position at the right.

You may create a shortcut to run this script, that will open the default path, our you can add a different path as the data in the shortcut to create manual bookmarks.

]]>

Crash report. Steps:

Crash report. Steps:

Make sure you have at least one folder in your app drawer.

Add a shortcut in your desktop to a lighting action ‘open folder’, choose a folder in your app drawer.

Open the folder from that shortcut from your desktop.

Long tap the background.

Settings, folder settings (or click the third icon)

Crash.

Tested on two devices. Can someone else confirm it?

]]>

Swipe and launch script

Swipe and launch script

I recently discovered how to trigger the material effect on lightning’s items, and made this little script.

The script is made to be set on the touch event of an item, and will allow to swipe across the items in the same container, selecting/deselecting them as you pass above them, launching when releasing.

Note: it only works if the selection effect is set to material, otherwise nothing will be shown (you can still launch them though). Also, non-clickable items are excluded.

In the video I show the script with a visible item at the bottom, for demonstration. Another option is to make it invisible, and big enough to cover all of the other ones, as if you can press wherever, but releasing will launch (you won’t be able to long tap or scroll this way, don’t make it full screen!).

]]>

Hmm, it’s been a while since I last used the ‘add multiple apps from the app drawer’ feature.

Hmm, it’s been a while since I last used the ‘add multiple apps from the app drawer’ feature.

I don’t know which version broke it, but currently doesn’t work (on my device at least)

Android 7.1.1, lightning 14.1.2

Does it work for you?

Video explanation:

Adding just an app works fine.

Adding multiple apps doesn’t add any (and I remember the mark not being a square…)

Canceling the multi selection doesn’t remove the marks, but then you can add an app as before.

Canceling the multi selection and enabling it again makes the selected number go negative…I think this was fixed in the past, didn’t it?

]]>

Suggestion: multi actions.

Suggestion: multi actions.

This suggestion can be a long to implement one, but I think it may be a powerful addition to LL. I think it was discussed before, but from comments and not as a whole post. If necessary I can make a flyspray about this (probably it is, but I prefer to ask).

Currently when you click on an event handler (tap, swipe, etc) it shows a list of lightning actions to choose (transforming this text-list into a icon-grid could be another suggestion, but for another post). When you choose an action it is set, and run when the event fire. Easy to understand.

This suggestion wants to change that, so that when you click on an event handler, a pop-up is shown instead where you can choose a list of actions, that will run sequentially. This list can be simple, with just an add button (that will show the current actions list to choose), the list of already added events, and edit/remove buttons on each one; or a more advanced window with different add buttons (for lightning actions, apps and shortcuts) a draggable list of added actions (to rearrange the order of execution) and edit/duplicate/remove buttons on each of them.

The idea is to allow multiple actions on each event, for example to:

– open an app and revert the position/zoom to 100%

– run a script and open an app

– run multiple shortcuts at once

– run multiple scripts without adding runScript

– run two apps (so when you close one, the other is shown instead of the desktop)

It will probably be necessary to change the EventHandler class, with a getList, addItem, etc. For compatibility maybe the getAction and getData can return those of the first in the list. This will need more thinking.

]]>

I was going to update the Spanish translation, and I saw a text that I couldn’t identify:

I was going to update the Spanish translation, and I saw a text that I couldn’t identify:

ad_b : Built-ins

Where is it used? I guess in the add item menu. An extra tab? With which items? And what is the difference with Plugins?

]]>

[Sorry for the long post. When I wrote the list I didn’t know it will grow so much]

[Sorry for the long post. When I wrote the list I didn’t know it will grow so much]

I’ve been playing around with the menu event and I have some suggestions and bugs (some unrelated to the menu event, but interesting specially #4 about frozen widgets)

Bugs:

1)With the sample script (the ‘hello goodbye’ one) occurs a bug that I think could happen in other places too: when clicking a menu (and the alert is shown) if an item in the container with a binding updates at the same time more or less, the alert will have as title the name of the binding script, instead of the menu one. I can repeatedly trigger this using the binding animate(“$ll_second”,1000)

2) In the script editor, while editing the name/path of a script from the dialog, clicking accept or cancel doesn’t hide the keyboard, it is still shown and active on the script code, that is possibly hidden by the side menu (the keyboard should close).

3) If you are on the script editor and you multitask to other apps, a script editor app is shown on the recent list. However clicking it shows the desktop instead of the editor.

4) I found a reliable way to freeze widgets, but first two related bugs:

4a) On general settings there is an ‘auto edit mode’ option that says ‘enter edit mode when adding an item’. I do remember that previously it said ‘when moving’, but now I’m not sure. Anyway that’s exactly what the setting does, not what it says. To be more clear: no matter what you choose, edit mode will be entered always after adding an item (except when adding a widget that opens an activity to configure).

4b) Add a panel, and then a widget. From 4a), if the widget doesn’t open an activity to configure, the panel will be in edit mode with the widget correctly displayed, but when you exit edit mode the widget is instead a ‘zombie widget’ (not sure how to call it). They will appear as if its internal ‘initialize event’ never run. Some I tried were shown as opaque rectangles, other even invisible. Best to try a few and check. To fix it restart the launcher.

4c) If you followed the steps in 4b) (add a panel, add a widget, restart launcher) now the widget works correctly…until you edit that panel. When doing so it will appear as normal while in edit mode, but from now on it won’t never update in normal mode (you can even interact, but it won’t update, and you can see the result of your clicking in edit mode). I’m highly sure the edit mode of a panel is a duplicated of the original panel, and the widget is a copy. There seem to be an issue with this, the widget on the original panel becomes a zombie and the one in the edit panel gets the updating events (or whatever).

Wow, so long. Now they come the suggestions:

5)Add a menu event in general settings. It will be nice to have an extra button in all menus of the launcher for example, or to change them to dark. Note that if you set a custom menu event of an item it will need to run both scripts (first the general one, then the custom). Not sure how difficult this is to implement, so don’t worry if you leave it on the todo list.

6) The menu event is only for scripts, and even choosing another action does nothing. So why not directly open the run a script dialog?

7) Talking about the run script dialog, now that they can be in folders what about the same ‘folder/name chooser with the ‘include sub directories’ checkbox?

Again sorry for the long post 😛

]]>