public class

Configuration

extends Object
java.lang.Object
   ↳ net.pierrox.lightning_launcher.script.api.Configuration

Class Overview

Access to some of the general launcher configuration data. An instance of this object can be retrieved with getConfiguration().

Summary

Public Methods
int[] getAllDesktops()
Returns an array of desktop identifiers, in the order specified in the configuration.
int getCurrentDesktopId()
Retrieve the current desktop id.
int getFloatingDesktopId()
Returns the desktop used as the floating desktop, or undefined if not set.
int getHomeDesktopId()
Returns the home desktop, the one used for the "Go to home desktop" action.
int getLiveWallpaperDesktopId()
Returns the desktop used as the live wallpaper, or undefined if not set.
int getLockscreenDesktopId()
Returns the desktop used as the lock screen, or undefined if not set.
PropertySet getProperties()
void setCurrentDesktopId(int desktopId)
Set which desktop to display when the launcher is started.
void setFloatingDesktopId(int desktopId)
Set which desktop to use as the floating desktop.
void setHomeDesktopId(int desktopId)
Set which desktop to use as the home desktop.
void setLiveWallpaperDesktopId(int desktopId)
Set which desktop to use as the live wallpaper.
void setLockscreenDesktopId(int desktopId)
Set which desktop to use on the lock screen.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int[] getAllDesktops ()

Returns an array of desktop identifiers, in the order specified in the configuration.

public int getCurrentDesktopId ()

Retrieve the current desktop id. The current desktop is the one to display in the home screen when starting the app. This is the same as getCurrentDesktop() but is accessible even when the home screen has not been created. The current desktop is saved to persistent storage so that the launcher can display it when relaunched. This can be seen as "the last viewed desktop". This function is meant to be used by background script when the home screen is not available.

public int getFloatingDesktopId ()

Returns the desktop used as the floating desktop, or undefined if not set.

Returns
  • identifier, or NONE if not set

public int getHomeDesktopId ()

Returns the home desktop, the one used for the "Go to home desktop" action.

public int getLiveWallpaperDesktopId ()

Returns the desktop used as the live wallpaper, or undefined if not set.

Returns
  • identifier, or NONE if not set

public int getLockscreenDesktopId ()

Returns the desktop used as the lock screen, or undefined if not set.

Returns
  • identifier, or NONE if not set

public PropertySet getProperties ()

public void setCurrentDesktopId (int desktopId)

Set which desktop to display when the launcher is started. This will not change the currently displayed desktop, if the home screen is visible. Note that this value is also set when calling. goToDesktop(int). This function is meant to be used by background script when the home screen is not available.

public void setFloatingDesktopId (int desktopId)

Set which desktop to use as the floating desktop.

Parameters
desktopId identifier of the desktop to use as the floating one. Using NONE to display a blank screen.

public void setHomeDesktopId (int desktopId)

Set which desktop to use as the home desktop. Please note that this will not automatically change the currently displayed desktop. Use goToDesktopPosition(int, float, float, float, boolean) for this.

Parameters
desktopId identifier of the desktop to use as the home desktop

public void setLiveWallpaperDesktopId (int desktopId)

Set which desktop to use as the live wallpaper. This isn't enough to activate the live wallpaper, Lightning must also be manually selected as the current live wallpaper engine.

Parameters
desktopId identifier of the desktop to use as the live wallpaper one. Using NONE will not disable the live wallpaper but display a blank screen.

public void setLockscreenDesktopId (int desktopId)

Set which desktop to use on the lock screen.

Parameters
desktopId identifier of the desktop to use as the lock screen. Use NONE to disable it.