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

Platform

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

window.deskifier.platform

Returns

  • isMacOs Boolean
  • isLinux Boolean
  • isWindows Boolean

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>


Get System Details

Overall details and specifications about the host system.

await window.deskifier.system.getDetails()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • details Object
    • libVersion String
      Version of the installed systeminformation library.
    • os si.osInfo
      Operating system details including platform, distro, release, kernel, and architecture.
    • system si.system
      Hardware specifications for the current device.
    • bios si.bios
      BIOS details including vendor, version, and release date.
    • baseboard si.baseboard
      Motherboard details including manufacturer, model, and memory slot info.
    • chassis si.chassis
      Chassis details including manufacturer, model, and type.
    • uuid si.uuid
      OS and hardware UUIDs, and MAC addresses.
    • versions si.versions
      Installed software versions such as Node.js, Git, Docker, Python, and more.
    • cpu si.cpu
      Static details of the current device's cpu, such as vendor and cores.
    • graphics si.graphics
      Static details of the current device's graphics controllers & displays.
    • net si.net
      Static details of the current device's network interfaces.
    • memLayout si.memLayout
      Static details of the current device's RAM.
    • diskLayout si.diskLayout
      Static details of the current device's storage devices.
    • audio si.audio
      Static details of the current device's audio devices.
    • usb si.usb
      Static details of the current device's connected USB devices.
    • printer si.printer
      Static details of the current device's connected printers.
    • bluetooth si.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>


Get Platform

Returns the platform flags for the host system asynchronously.

await window.deskifier.system.getPlatform()

Returns

  • isMacOs Boolean
  • isLinux Boolean
  • isWindows Boolean

Get Version

Returns the Deskifier version information for the running app.

await window.deskifier.system.getVersion()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • versionSpecific String
    The full version string (e.g. 1.2.3).
  • versionGeneric String
    The major version string (e.g. 1).

Get Color

macOS Windows Returns the used system color for a given color in hex format.

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

Arguments

  • element String
    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 String
    The color value in hex format.
  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.

Example

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

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

Get Accent Color

macOS Windows Returns the system wide accent color

await window.deskifier.system.getAccentColor()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • accentColor String
    Color in RGBA hexadecimal form.

Get System Color

macOS Returns one of several standard system colors that automatically adapt to vibrancy and changes in accessibility settings like 'Increase contrast' and 'Reduce transparency'.

See Apple Documentation for more details.

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

Arguments


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

  • color String
    Can be one of the following values:
    • blue
    • brown
    • gray
    • green
    • orange
    • pink
    • purple
    • red
    • yellow

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • color String
    Color in RGBA hexadecimal form.

Get Cursor Point

Returns the current absolute position of the mouse pointer.

await window.deskifier.system.getCursorPoint()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • point Electron.Point

Get Primary Display

Returns details about the system's primary screen.

await window.deskifier.system.getPrimaryDisplay()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • display Electron.Display

Get All Displays

Returns an array of system displays.

await window.deskifier.system.getAllDisplays()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • displays Array Of Electron.Display

Get Screen Details

Returns screen-specific details for all connected displays.

await window.deskifier.system.getScreenDetails()

Returns

Array of Objects, each with:

  • screenID Number
  • rotation Number
  • scaleFactor Number
  • displayFrequency Number
  • displayHeight Number
  • displayWidth Number
  • workAreaHeight Number
  • workAreaWidth Number
  • isPrimaryDisplay Boolean

Get CPU Usage

Gets the current CPU usage percentage for the system.

await window.deskifier.system.getCpuUsage()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • cpuUsage Number
    Current CPU usage as a percentage.

Get Memory Info

Gets the system's memory details.

await window.deskifier.system.getMemoryInfo()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • total Number
    The total amount of physical memory in Kilobytes available to the system.
  • free Number
    The total amount of memory not being used by applications or disk cache.
  • totalHuman String
    The total amount of physical memory in Kilobytes available to the system, formatted as human readable (ex. "128mb")
  • freeHuman String
    The total amount of memory not being used by applications or disk cache., formatted as human readable (ex. "128mb")
  • swapTotal Number Linux Windows
    The total amount of swap memory in Kilobytes available to the system.
  • swapFree Number Linux Windows
    The free amount of swap memory in Kilobytes available to the system.

Get Process Memory Info

Returns memory stats for the current application.

await window.deskifier.system.getProcessMemoryInfo()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • ProcessMemoryInfo Electron.ProcessMemoryInfo

Get Idle Time

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

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.

await window.deskifier.system.getIdleTime()

Returns

  • success Boolean
    If the action was successful.
  • message String
    Additional confirmation, or error details if action was unsuccessful.
  • idleTime Number

Events

Display Added

Fires when a new display is detected.

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

Arguments


Display Removed

Fires when a display is removed.

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

Arguments