getStateData

returns current state of the apps

array getStateData();
arrayan array of apps

Example

const stateData = $$("mydesktop").getStateData();
//-> [{
        name: "Spreadsheet",
        icon: "imgs/spreadsheet.png",
        pin: ["bar", "desktop"]б
        id:"spreadsheet",
        $x:0,
        $y:0
    },
    {
        name: "Filemanager",
        icon: "imgs/filemanager.png",
        pin: ["bar"],
        id:"filemanager",
        $x:0,
        $y:110
    },
    ...
]

Details

Each object in the array has the following properties:

  • id - (number | string) app id
  • name - (string) app name
  • icon - (string) optional, a path to the app icon
  • $x - (number) a left offset for the app icon
  • $y - (number) a top offset for the app icon
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.