# System

System details like screens, config such as color and theme settings, and other system performance details, get gpu info, getappmetrics in app api

## Properties

### <mark style="color:purple;">Platform</mark>

A static object with the platform the host system is running.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
window.deskifier.platform
```

**Returns**

* `isMacOs` <mark style="color:green;">Boolean</mark>
* `isLinux` <mark style="color:green;">Boolean</mark>
* `isWindows` <mark style="color:green;">Boolean</mark>

**Example**

<pre class="language-javascript" data-overflow="wrap"><code class="lang-javascript"><strong>const result = window.deskifier.platform.isMacOs
</strong>
console.log(result);  
<strong>// False
</strong></code></pre>

{% endtab %}
{% endtabs %}

***

### <mark style="color:purple;">Get System Details</mark>

Overall details and specifications about the host system.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getDetails()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `details` <mark style="color:green;">Object</mark>
  * `libVersion` <mark style="color:green;">String</mark>\
    Version of the installed [systeminformation](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#1-general) library.
  * `os` [<mark style="color:blue;">si.osInfo</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#3-operating-system)\
    Operating system details including platform, distro, release, kernel, and architecture.
  * `system` [<mark style="color:blue;">si.system</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#2-system-hw)\
    Hardware specifications for the current device.
  * `bios` [<mark style="color:blue;">si.bios</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#2-system-hw)\
    BIOS details including vendor, version, and release date.
  * `baseboard` [<mark style="color:blue;">si.baseboard</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#2-system-hw)\
    Motherboard details including manufacturer, model, and memory slot info.
  * `chassis` [<mark style="color:blue;">si.chassis</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#2-system-hw)\
    Chassis details including manufacturer, model, and type.
  * `uuid` [<mark style="color:blue;">si.uuid</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#2-system-hw)\
    OS and hardware UUIDs, and MAC addresses.
  * `versions` [<mark style="color:blue;">si.versions</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#1-general)\
    Installed software versions such as Node.js, Git, Docker, Python, and more.
  * `cpu` [<mark style="color:blue;">si.cpu</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#2-system-hw)\
    Static details of the current device's cpu, such as vendor and cores.
  * `graphics` [<mark style="color:blue;">si.graphics</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#6-graphics)\
    Static details of the current device's graphics controllers & displays.
  * `net` [<mark style="color:blue;">si.net</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#13-network-related-functions)\
    Static details of the current device's network interfaces.
  * `memLayout` [<mark style="color:blue;">si.memLayout</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#4-memory)\
    Static details of the current device's RAM.
  * `diskLayout` [<mark style="color:blue;">si.diskLayout</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#9-file-system)\
    Static details of the current device's storage devices.
  * `audio` [<mark style="color:blue;">si.audio</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#12-audio)\
    Static details of the current device's audio devices.
  * `usb` [<mark style="color:blue;">si.usb</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#10-usb)\
    Static details of the current device's connected USB devices.
  * `printer` [<mark style="color:blue;">si.printer</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#11-printer)\
    Static details of the current device's connected printers.
  * `bluetooth` [<mark style="color:blue;">si.bluetooth</mark>](https://github.com/sebhildebrandt/systeminformation?tab=readme-ov-file#14-bluetooth)\
    Static details of the current device's paired Bluetooth devices.

**Example**

<pre class="language-javascript" data-overflow="wrap"><code class="lang-javascript"><strong>const result = await window.deskifier.system.getDetails();
</strong>
console.log(result.details.graphics);  
<strong>/*
</strong>{
  "controllers": [
    {
      "vendor": "NVIDIA",
      "model": "NVIDIA GeForce RTX 4080",
      "bus": "PCI",
      "vram": 16376,
      "vramDynamic": true,
      "subDeviceId": "123"
    }
  ],
  "displays": [
     {
      "vendor": "",
      "model": "Default Monitor",
      "deviceName": "DISPLAY1",
      "main": true,
      "builtin": false,
      "connection": "DP",
      "resolutionX": 2560,
      "resolutionY": 1440,
      "sizeX": 53,
      "sizeY": 30,
      "pixelDepth": 32,
      "currentResX": 2560,
      "currentResY": 1440,
      "positionX": 0,
      "positionY": 0,
      "currentRefreshRate": 143
    }
    ]
}
*/
</code></pre>

{% endtab %}
{% endtabs %}

***

### <mark style="color:purple;">Get Platform</mark>

Returns the platform flags for the host system asynchronously.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getPlatform()
```

**Returns**

* `isMacOs` <mark style="color:green;">Boolean</mark>
* `isLinux` <mark style="color:green;">Boolean</mark>
* `isWindows` <mark style="color:green;">Boolean</mark>
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Version</mark>

Returns the Deskifier version information for the running app.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getVersion()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `versionSpecific` <mark style="color:green;">String</mark>\
  The full version string (e.g. `1.2.3`).
* `versionGeneric` <mark style="color:green;">String</mark>\
  The major version string (e.g. `1`).
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Color</mark>

<mark style="color:purple;background-color:purple;">**macOS**</mark> <mark style="color:purple;background-color:purple;">**Windows**</mark> Returns the used system color for a given color in hex format.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getColor({ arguments })
```

**Arguments**

* `element` <mark style="color:green;">String</mark>\
  Pass in the desired value to get it's setting.
  * On **Windows**:
    * `3d-dark-shadow` - Dark shadow for three-dimensional display elements.
    * `3d-face` - Face color for three-dimensional display elements and for dialog box backgrounds.
    * `3d-highlight` - Highlight color for three-dimensional display elements.
    * `3d-light` - Light color for three-dimensional display elements.
    * `3d-shadow` - Shadow color for three-dimensional display elements.
    * `active-border` - Active window border.
    * `active-caption` - Active window title bar. Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled.
    * `active-caption-gradient` - Right side color in the color gradient of an active window's title bar.
    * `app-workspace` - Background color of multiple document interface (MDI) applications.
    * `button-text` - Text on push buttons.
    * `caption-text` - Text in caption, size box, and scroll bar arrow box.
    * `desktop` - Desktop background color.
    * `disabled-text` - Grayed (disabled) text.
    * `highlight` - Item(s) selected in a control.
    * `highlight-text` - Text of item(s) selected in a control.
    * `hotlight` - Color for a hyperlink or hot-tracked item.
    * `inactive-border` - Inactive window border.
    * `inactive-caption` - Inactive window caption. Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled.
    * `inactive-caption-gradient` - Right side color in the color gradient of an inactive window's title bar.
    * `inactive-caption-text` - Color of text in an inactive caption.
    * `info-background` - Background color for tooltip controls.
    * `info-text` - Text color for tooltip controls.
    * `menu` - Menu background.
    * `menu-highlight` - The color used to highlight menu items when the menu appears as a flat menu.
    * `menubar` - The background color for the menu bar when menus appear as flat menus.
    * `menu-text` - Text in menus.
    * `scrollbar` - Scroll bar gray area.
    * `window` - Window background.
    * `window-frame` - Window frame.
    * `window-text` - Text in windows.
  * On **macOS**
    * `control-background` - The background of a large interface element, such as a browser or table.
    * `control` - The surface of a control.
    * `control-text` -The text of a control that isn't disabled.
    * `disabled-control-text` - The text of a control that's disabled.
    * `find-highlight` - The color of a find indicator.
    * `grid` - The gridlines of an interface element such as a table.
    * `header-text` - The text of a header cell in a table.
    * `highlight` - The virtual light source onscreen.
    * `keyboard-focus-indicator` - The ring that appears around the currently focused control when using the keyboard for interface navigation.
    * `label` - The text of a label containing primary content.
    * `link` - A link to other content.
    * `placeholder-text` - A placeholder string in a control or text view.
    * `quaternary-label` - The text of a label of lesser importance than a tertiary label such as watermark text.
    * `scrubber-textured-background` - The background of a scrubber in the Touch Bar.
    * `secondary-label` - The text of a label of lesser importance than a normal label such as a label used to represent a subheading or additional information.
    * `selected-content-background` - The background for selected content in a key window or view.
    * `selected-control` - The surface of a selected control.
    * `selected-control-text` - The text of a selected control.
    * `selected-menu-item-text` - The text of a selected menu.
    * `selected-text-background` - The background of selected text.
    * `selected-text` - Selected text.
    * `separator` - A separator between different sections of content.
    * `shadow` - The virtual shadow cast by a raised object onscreen.
    * `tertiary-label` - The text of a label of lesser importance than a secondary label such as a label used to represent disabled text.
    * `text-background` - Text background.
    * `text` - The text in a document.
    * `under-page-background` - The background behind a document's content.
    * `unemphasized-selected-content-background` - The selected content in a non-key window or view.
    * `unemphasized-selected-text-background` - A background for selected text in a non-key window or view.
    * `unemphasized-selected-text` - Selected text in a non-key window or view.
    * `window-background` - The background of a window.
    * `window-frame-text` - The text in the window's titlebar area.

**Returns**

* `color` <mark style="color:green;">String</mark>\
  The color value in hex format.
* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.

**Example**

{% code overflow="wrap" %}

```javascript
const result = await window.deskifier.system.getColor({ element: 'window-background' });

console.log(result.color);  // #FFFFFF
```

{% endcode %}
{% endtab %}
{% endtabs %}

***

### <mark style="color:purple;">Get Accent Color</mark>

<mark style="color:purple;background-color:purple;">**macOS**</mark> <mark style="color:purple;background-color:purple;">**Windows**</mark> Returns the system wide accent color

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getAccentColor()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `accentColor` <mark style="color:green;">String</mark>\
  Color in RGBA hexadecimal form.
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get System Color</mark>

<mark style="color:purple;background-color:purple;">**macOS**</mark> Returns one of several standard system colors that automatically adapt to vibrancy and changes in accessibility settings like 'Increase contrast' and 'Reduce transparency'.

{% hint style="info" %}
See [Apple Documentation](https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/color#system-colors) for more details.
{% endhint %}

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getSystemColor({ arguments })
```

**Arguments**

\
Pass in the desired value to get it's setting.

* `color` <mark style="color:green;">String</mark>\
  Can be one of the following values:
  * `blue`
  * `brown`
  * `gray`
  * `green`
  * `orange`
  * `pink`
  * `purple`
  * `red`
  * `yellow`

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `color` <mark style="color:green;">String</mark>\
  Color in RGBA hexadecimal form.
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Cursor Point</mark>

Returns the current absolute position of the mouse pointer.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getCursorPoint()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `point` [<mark style="color:blue;">Electron.Point</mark>](https://www.electronjs.org/docs/latest/api/structures/point)
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Primary Display</mark>

Returns details about the system's primary screen.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getPrimaryDisplay()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `display` [<mark style="color:blue;">Electron.Display</mark>](https://www.electronjs.org/docs/latest/api/structures/display)
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get All Displays</mark>

Returns an array of system displays.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getAllDisplays()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `displays` <mark style="color:blue;">Array Of</mark> [<mark style="color:blue;">Electron.Display</mark>](https://www.electronjs.org/docs/latest/api/structures/display)
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Screen Details</mark>

Returns screen-specific details for all connected displays.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getScreenDetails()
```

**Returns**

<mark style="color:blue;">Array of</mark> Objects, each with:

* `screenID` <mark style="color:green;">Number</mark>
* `rotation` <mark style="color:green;">Number</mark>
* `scaleFactor` <mark style="color:green;">Number</mark>
* `displayFrequency` <mark style="color:green;">Number</mark>
* `displayHeight` <mark style="color:green;">Number</mark>
* `displayWidth` <mark style="color:green;">Number</mark>
* `workAreaHeight` <mark style="color:green;">Number</mark>
* `workAreaWidth` <mark style="color:green;">Number</mark>
* `isPrimaryDisplay` <mark style="color:green;">Boolean</mark>
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get CPU Usage</mark>

Gets the current CPU usage percentage for the system.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getCpuUsage()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `cpuUsage` <mark style="color:green;">Number</mark>\
  Current CPU usage as a percentage.
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Memory Info</mark>

Gets the system's memory details.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getMemoryInfo()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `total` <mark style="color:green;">Number</mark>\
  The total amount of physical memory in Kilobytes available to the system.
* `free` <mark style="color:green;">Number</mark>\
  The total amount of memory not being used by applications or disk cache.
* `totalHuman` <mark style="color:green;">String</mark>\
  The total amount of physical memory in Kilobytes available to the system, formatted as human readable (ex. "128mb")
* `freeHuman` <mark style="color:green;">String</mark>\
  The total amount of memory not being used by applications or disk cache., formatted as human readable (ex. "128mb")
* `swapTotal` <mark style="color:green;">Number</mark> ***Linux*** ***Windows***\
  The total amount of swap memory in Kilobytes available to the system.
* `swapFree` <mark style="color:green;">Number</mark> ***Linux*** ***Windows***\
  The free amount of swap memory in Kilobytes available to the system.
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Process Memory Info</mark>

Returns memory stats for the current application.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getProcessMemoryInfo()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `ProcessMemoryInfo` [<mark style="color:blue;">Electron.ProcessMemoryInfo</mark>](https://www.electronjs.org/docs/latest/api/structures/process-memory-info)
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Get Idle Time</mark>

Returns the amount of time the system has been idle in seconds.

{% hint style="info" %}
The system is considered idle when there are no keyboard or mouse inputs. The counter will start shortly after the last input, and will restart when the next input is detected.
{% endhint %}

{% tabs %}
{% tab title="JavaScript" %}

```javascript
await window.deskifier.system.getIdleTime()
```

**Returns**

* `success` <mark style="color:green;">Boolean</mark>\
  If the action was successful.
* `message` <mark style="color:green;">String</mark>\
  Additional confirmation, or error details if action was unsuccessful.
* `idleTime` <mark style="color:green;">Number</mark>
  {% endtab %}
  {% endtabs %}

***

## Events

### <mark style="color:purple;">Display Added</mark>

Fires when a new display is detected.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
window.deskifier.system.onDisplayAdded((display) => { })
```

**Arguments**

* `display` [<mark style="color:blue;">Electron.Display</mark>](https://www.electronjs.org/docs/latest/api/structures/display)\
  The newly added display.
  {% endtab %}
  {% endtabs %}

***

### <mark style="color:purple;">Display Removed</mark>

Fires when a display is removed.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
window.deskifier.system.onDisplayRemoved((display) => { })
```

**Arguments**

* `display` [<mark style="color:blue;">Electron.Display</mark>](https://www.electronjs.org/docs/latest/api/structures/display)
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://deskifier.gitbook.io/deskifier/system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
