TrianguloY
now browsing by tag
clipboard viewer
clipboard viewer
This is a small (this time it is small, really) script that will show the content of the clipboard in an editable textbox.
How to add the textbox: add a custom view and set this script in the create event, the resumed event and the paused event (I used a trick to detect the created event that maybe will be broken in the future. If so tell me to fix it)
How to use the textbox: everything is shown in the video but here is the summary
When the textbox is resumed it takes the content of the clipboard, if it is text.
When the textbox is paused:
If the textbox didn’t changed, do nothing
If the textbox changed and the clipboard don’t, the content of the textbox is copied into the clipboard
If the content of the clipboard changed, even if the textbox changed too the clipboard keeps the text, and the textbox is discarded. This is done this way to be able to, for example, copy a part of the current clipboard easily.
It doesn’t use clipboard listeners. I know I can use them to update instantly the content, but in my opinion that’s not necessary in this case. This way the battery impact, if any, should be the minimum.
Note: you can change the color of the text in the first line of he script.
]]>A list of suggestions for the icon picker Pierre Hébert:
1) instead of ‘broken icon pack’ I think it is better to say ‘unsupported icon pack’ or ‘not supported icon pack’
2) when you choose a ‘broken’ icon pack big text is shown “no icon to display”. What about “no icon to display, click here to try an alternative method” and then clicking the text will show all the images in the app (change the first list to ‘applications’ and the second to the app name)
3) in the list of icon packs, a ‘default’ entry that will show the list of the defaults icons of all installed apps.
4) in the launcher images tab, instead of simply show the containers numbers show the type and the name if any. Something like “0-Desktop : My desktop” “102-Folder : Games” “103-panel” “99-app drawer”
]]>select and launch
select and launch
This is a small script that makes tap to select, and tap again to launch.
As seen in the video with the first click the item is selected, and when clicking again the item is launched.
If you click the background, the selected item, if any, is deselected.
And, if you click an item while another one is selected, the ‘selector’ indicator moves smoothly (more or less).
A nine patch is highly recommended!! This is the sample one used in the video https://www.dropbox.com/s/xmat6pf1vy6mt5c/selectable.9.png?dl=0
Note: the original script was very simple, so I added a wizard to help in the installation process…and to make the script a bit more complex 😛
So you only need to run the script in the container (remember to check the lightning menu checkbox in the script editor) and follow the instructions.
The same to uninstall it.
]]>Strange script bug
c is the container, i is an item
It should remove the item, but it does not.
However it works without modifying anything even if you commit.
(It is extracted from a bigger script, perhaps the save is not necessary)
LL.save();
c.getProperties().edit().setEventHandler(“i.tap”,EventHandler.UNSET,null).commit();//doesn’t work
//c.getProperties().edit().commit();//does work
c.removeItem(i);
LL.save();
]]>Two bugs in one Pierre Hébert!
Steps:
Panel with some items (maybe also desktop)
Enter edit mode without any item selected (default properties of the items in the panel)
Change the tap action to ‘run a script’ (any script)
Change the tap action to ‘unset’
Now all items have the custom tap action ‘run a script’ instead of unset
Select an item
Click the ‘custom’ checkbox in the tap action
Now it is reset to unset, but the checkbox is still checked instead of uncheck.
]]>Since latest beta versions, I think it worked in the stable but I’m not 100% sure, when using image.update() to show…
The steps are simple: run this script made by you Pierre Hébert 😉 http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_paint_free_hand
]]>Another round of suggestions, theme: bindings
1) Now it’s easier to show/hide an item from bindings, but when it is hidden it is hard to select it (you need to use the hierarchy). What about show hidden items automatically in edit mode? A checkbox in settings (or even in the editor bars) to enable/disable this feature will maybe be necessary.
2) Now I mention that: what about a shortcut in the editor bars to show the hierarchy menu?
3) You can set the value of a variable through a lightning action, but it is set as text (converted to number from JavaScript I guess). What about evaluate the input? The same as the binding box. Optionally, a checkbox to change between ‘value’ and ‘expression’. This will help to make toggles.
4) This suggestion is more suitable to simply write it in the to-do list and forget. The list of available lighting actions have increase in length, maybe a sort, even with categories, will help to find easily what you want (specially because the ‘run script’ and ‘set a variable’ are in the middle 😛 )
]]>Pierre Hébert is it possible somehow that the pop-up menu (when long pressing an item or background) doesn’t…
If not, maybe a way to close it?
]]>About bindings:
If you bind a ‘hard’ feature like (icon) colorize, when it changes, the container scrolling becomes unresponsive, and other bindings refresh slower.
This is really noticeable if you bind this to the colorize
Color.HSVToColor([animate(“$ll_second”)/60*360,1,1])
And question: is the ‘dummy’ feature suitable for tests and clocks that doesn’t need to change anything about the item? Does it needs a return? I found the answer in the wiki
Two quick suggestions:
Save the zoom from the script editor in the backups
If you browse a broken icon pack, place a button ‘all images mode’ that will automatically change the picker to ‘application’ and the icon pack package (maybe also even if the icon pack is not broken? )
]]>
D5 Creation