h-electron-window-state

0.0.4 • Public • Published

This repository is a fork of mawie81/electron-window-state It shares all the functionality the original repo has, but this version also can save window state to an already existing JSON file. To do that you need to pass object_path property to windowStateKeeper function

  let mainWindowState = windowStateKeeper({
    defaultWidth: 1000,
    defaultHeight: 800,
    object_path: 'settings.window.position',
    path: 'app-settings.json'
  });

So your app-settings.json file would look like this

  {
    ...
    ...
    settings: {
      window: {
        position: { Here will be the window state }
      }
    }
  }

Readme

Keywords

Package Sidebar

Install

npm i h-electron-window-state

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

7.4 kB

Total Files

3

Last publish

Collaborators

  • harumando