System
System
Kind: global class
- System
- new System()
- .enableDevTools()
- .getSource() ⇒
Promise.<string>
- .getTheme() ⇒
Promise.<string>
- .setVisibility(state)
- .getVisibility() ⇒
Promise.<bool>
- .setDesktopIconVisibility(state)
- .getDesktopIconVisibility() ⇒
Promise.<bool>
new System()
Configure system options and request system information.
system.enableDevTools()
Open the DevTools window for mod debugging.
Kind: instance method of System
Example
const system = new octos.System();
system.enableDevTools();
system.getSource() ⇒ Promise.<string>
Get the source uri of the current document.
Kind: instance method of System
Returns: Promise.<string>
- Resolves to the document's uri.
Example
system.getSource().then((uri) => alert(uri))
system.getTheme() ⇒ Promise.<string>
Get the system theme (light or dark).
Kind: instance method of System
Returns: Promise.<string>
- Resolves to either 'light'
or 'dark'
.
Example
system.getTheme().then((theme) => alert(theme))
system.setVisibility(state)
Set the wallpaper's visibility.
Kind: instance method of System
Param | Type | Description |
---|---|---|
state | bool |
true for visible, false for hidden. |
system.getVisibility() ⇒ Promise.<bool>
Request the wallpaper's visibility.
Kind: instance method of System
Returns: Promise.<bool>
- Resolves to true
for visible, false
for hidden.
system.setDesktopIconVisibility(state)
Set the visibility of desktop icons. Useful for hiding the desktop icons when mouse input is expected and then re-enabling them when finished.
Kind: instance method of System
Param | Type | Description |
---|---|---|
state | bool |
true for visible, false for hidden. |
system.getDesktopIconVisibility() ⇒ Promise.<bool>
Request the visibility of desktop icons.
Kind: instance method of System
Returns: Promise.<bool>
- Resolves to true
for visible, false
for hidden.