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