**This is an old revision of the document!** ----
====== About the script ====== * Purpose : This script will dim all other stuff if you open a folder * Author : [[https://plus.google.com/+LukasMorawietz|LM13]] * Current Version : 2.3 * Link : https://plus.google.com/115366157037831519359/posts/24AHYbCWrXn * Video : https://plus.google.com/115366157037831519359/posts/3ZY4BWnZbmp * Download avialable! (Check repository) ====== Changelog ====== * Version 2.0 (28/5/2014): initial release in wiki * Version 2.1 (18/7/2014): auto create item * Version 2.2 (16/11/2014): bugfix, apk version contains UI * Version 2.3 (4/12/2014): bugfix ====== How to use the script ====== * in the folder: set the script to paused and resumed event * set up configuration if you don't like the standard values Or: Simply load the apk in that folder ====== Issues and hints ====== * the orientation fix may interfere with your desktop boundings, so keep it off unless you need it //please report all bugs in the g+ community// ====== Script code ====== <sxh javascript;>var data=JSON.parse(LL.getEvent().getContainer().getTag("dim"))||new Object(); var speed=data.speed||10;//lower is faster, 1 for instant var dim=data.dim||150;//0 for nothing, 255 for solid black var orientationfix=data.fix;//true if you want to switch screen orientation while folder open var d=LL.getCurrentDesktop(); var i=d.getItemByLabel("bg")||d.addShortcut("bg",new Intent(),0,0); var p=i.getProperties(); if(LL.getEvent().getSource()=="C_RESUMED"&&LL.getOpenFolders().length==0) { d.setItemZIndex(i.getId(),d.getItems().getLength()-1); var editor=p.edit(); editor.setBoolean("i.onGrid",false).setString("i.pinMode","XY").setBoolean("i.enabled",false).setBoolean("s.iconVisibility",false).setBoolean("s.labelVisibility",false); editor.getBox("i.box").setColor("c","n",0xff000000); editor.commit(); if(orientationfix){ var s=Math.max( d.getWidth(),d.getHeight())*1.1; i.setSize(s,s);} else i.setSize( d.getWidth(),d.getHeight()); i.setPosition(0,0); var x=0; a(); } else if(LL.getOpenFolders().length==0){ var x=speed; b(); } function a() { x++; p.edit().setInteger("i.alpha",x*dim/speed).commit(); if(x<speed)setTimeout(a,0); } function b() { x--; p.edit().setInteger("i.alpha",x*dim/speed).commit(); if(x>0)setTimeout(b,0); else d.removeItem(i); } </sxh>