TrianguloY

now browsing by tag

 
 

Always-there bar

Always-there bar

This is a script that place an item (in the video a panel) always on top of the screen. Scroll down the desktop to show it. Scroll up to hide.

Pierre Hébert: you did it.

I’m not sure how, but with the synchronous scripts…all is beautiful 😀 Thanks!

Luckily I made a demonstration video with the 9.9.9 version. Another one with 9.9.10

I’m sure you will find the difference 😉 The change is awesome!

Instructions:

– Copy paste this script as a new one.

– IMPORTANT: you need to label “always-bar” the item you want to move

– Pin that item and detach it from the grid

– Set the script in the position change event of the desktop

Settings: you can change the velocity of scrolling. Just modify the numbers at the beggining of the script, nothing more

———————————

/*Settings */

//this number means the velocity of showing/hidding respectively

//1 is the default ( like the desktop ) the bigger, the faster (avoid negative numbers, between (0,1) will be slower )

var vs = 2;//show

var vh = 0.5;//hide

var cont = LL.getEvent().getContainer();

//item to move

var bar = cont.getItemByLabel(“always-bar”);

if(bar==null){alert(“Warning: no item with label ‘always-bar’ found.”);return;}

/* current position

// in case don’t exist

//difference

//save

*/

var contpos = cont.getPositionY();

var prev = parseInt(bar.getTag());

var d = contpos-prev;

bar.setTag(contpos);

var barpos = bar.getPositionY();

var size=bar.getScaleY() * bar.getHeight();

var posx=bar.getPositionX();

/*hide the bar */

if(d>0 && barpos>-size){

if(barpos-d*vh<-size || barpos<-size){

bar.setPosition(posx,-size);

}else{

bar.setPosition(posx,barpos-d*vh);

}

}

/*show the bar */

if(d<0 && barpos<0){

if(barpos-d*vs>0 || barpos>0){

bar.setPosition(posx,0);

}else{

bar.setPosition(posx,barpos-d*vs);

}

}

]]>

Title

]]>

API script suggestion:

API script suggestion:

The item.getTag() , setTag() is awesome (I’ll post a lock screen script soon) however there is something that stops me…It is attached to an item.

Suggestion: what about a tag attached to the script itself?

Possibility 1) I don’t know how JavaScript works exactly, but maybe there is a way to make a constant var (like this.tag…or whatever)

Possibility 2) add a

LL.setTag(String tag),

String LL.getTag()

that will get/set the tag of the script. Optionally maybe also two overloads

LL.setTag(String tag , String script)

String LL.getTag(String script)

to allow set/get the tag of other scripts…maybe useful in the future.

]]>

Visual folder

Visual folder

This script will automatically detect the position of an item (detached or not) relatively from the actual screen, and then apply it to a folder.

You need to run it from the long click menu. (It will detect if the item is a folder or not)

The data is saved and applied once.

Instructions:

– Copy paste this script, check the ‘show in item menu’

– Place an item (not a folder) and change their size as you want, relative to the screen itself, not the desktop (you can be far away from the main page)

– Run the script. The position/size will be saved.

– Run the script in a folder. Apply.

(- Now you can delete the previous item if you want.)

{Improved thanks to TBog suggestion}

———————————–

var item = LL.getEvent().getItem();

var desk = LL.getEvent().getContainer() || LL.getCurrentDesktop();

if(item.getType()==”Folder”){

    if(!(“visualFolder” in self)){alert(“No data found\nYou need to run the script from a non-folder first to save data”); return;}

    if(!confirm(“Folder detected. Would you like to apply the saved data?”) )return;

    

    item.getProperties().edit().

    setString(“f.wAH”,”CUSTOM”).

    setString(“f.wAV”, “CUSTOM”).

    setInteger(“f.wX”, self.visualFolder[0] ).

    setInteger( “f.wY”, self.visualFolder[1] ).

    setInteger( “f.wW”, self.visualFolder[2] ).

    setInteger( “f.wH”, self.visualFolder[3] ).

    commit();

    Android.makeNewToast(“Data applied”,false).show();

}else{

    self.visualFolder=[];

    

    self.visualFolder[0] = item.getPositionX()-desk.getPositionX();

    self.visualFolder[1] = item.getPositionY()-desk.getPositionY();

    self.visualFolder[2] = item.getWidth()*item.getScaleX();

    self.visualFolder[3] = item.getHeight()*item.getScaleY();

    Android.makeNewToast(“Saved data. Run the script on a folder to apply”,false).show();

    

}

]]>

Suggestion: in some scripts, I need to be able to scroll infinitely.

Suggestion: in some scripts, I need to be able to scroll infinitely.

How about a checkbox in the settings, to allow infinite scrolling?

Another possibility will be to enable that feature from script only (in the property editor).

]]>

‘Multi Container bookmark’

‘Multi Container bookmark’

This script will make a script that will set the position of all panels inside the desktop/folder in wich it was launched. [Not very difficult to understand, but you need to know how functions work.]

Instructions:

-Copy/paste this script as a new one. Check the ‘Appear in ligthning menu’ and/or ‘item menu’.

-Go to the desktop/folder, place all panels ( and the desktop/folder) as you want and run the script. [smoothly here means not instantly]

-Copy the output script and paste it as a new one.

Now you just need to launch that script.

You can comment suggestions, problems…

——————————————

var parent = LL.getEvent().getContainer() || LL.getCurrentDesktop();

if(parent.getId()==-1)parent=LL.getCurrentDesktop();

while( parent.getType()!=”Desktop” && parent.getOpener().getType()!=”Folder”){

    parent = parent.getParent();

}

function run(cont){

    var str = “LL.getContainerById(“+

    cont .getId() + “).setPosition(“+

    cont .getPositionX()+”,”+

    cont .getPositionY()+”,”+

    cont .getPositionScale()+”,”+animations+”);\n”;

    var items = cont.getItems();

    for(var i=items.getLength()-1;i>=0;–i){

        if(items.getAt(i).getType()==”Panel”){str+=run(items.getAt(i).getContainer() );}

    }

    return str;

}

var animations = confirm(“Do you want to go smoothly? (not instantly)”);

prompt(“Script to use: Copy, paste and run”,run(parent));

]]>

From the previous post discussing the ‘advanced’ the app has become:

From the previous post discussing the ‘advanced’ the app has become:

Pierre Hébert

What about disable/enable the advanced features (we will need to discuss which ones) with a simple checkbox in all settings?

They will be only hidden, so they will still work in case someone load a template with them.

New users will only see the ‘basic’ features and that checkbox. Check it or not will be their decision, and maybe this will help to understand that LL is more than a launcher.

]]>

When you improved the search feature in the app drawer, you finally made that my keyboard (for some reason seems to…

When you improved the search feature in the app drawer, you finally made that my keyboard (for some reason seems to be different) appear automatically.

Now I realize that it also happens with the ‘edit label’ pop-up (from the pop-up menu and from the edit item menu)

It also happen with the edit desktop name, but I think that the pop-up is the same.

If you can make the same as with the search text box(so the keyboard will show automatically) it will be appreciated, but it’s not as important as that.

]]>

Here it is:

Here it is:

(Check my second previous post to see what I’m talking about)

]]>

Demonstration Video: https://plus.google.com/105066926163073195690/posts/Uak865eQA1j

Demonstration Video: https://plus.google.com/105066926163073195690/posts/Uak865eQA1j

How to make a ‘keyboard’ lock screen: (I’m not good with tutorials, and I made it with my mobile phone, so please understand)

The photos explain the process

The video is to show better how it is done without transparent items.

The only thing you need to know is how to make desktop bookmarks.

]]>