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
isMacOsBooleanisLinuxBooleanisWindowsBoolean
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
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.detailsObjectlibVersionString
Version of the installed systeminformation library.ossi.osInfo
Operating system details including platform, distro, release, kernel, and architecture.systemsi.system
Hardware specifications for the current device.biossi.bios
BIOS details including vendor, version, and release date.baseboardsi.baseboard
Motherboard details including manufacturer, model, and memory slot info.chassissi.chassis
Chassis details including manufacturer, model, and type.uuidsi.uuid
OS and hardware UUIDs, and MAC addresses.versionssi.versions
Installed software versions such as Node.js, Git, Docker, Python, and more.cpusi.cpu
Static details of the current device's cpu, such as vendor and cores.graphicssi.graphics
Static details of the current device's graphics controllers & displays.netsi.net
Static details of the current device's network interfaces.memLayoutsi.memLayout
Static details of the current device's RAM.diskLayoutsi.diskLayout
Static details of the current device's storage devices.audiosi.audio
Static details of the current device's audio devices.usbsi.usb
Static details of the current device's connected USB devices.printersi.printer
Static details of the current device's connected printers.bluetoothsi.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
isMacOsBooleanisLinuxBooleanisWindowsBoolean
Get Version
Returns the Deskifier version information for the running app.
await window.deskifier.system.getVersion()
Returns
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.versionSpecificString
The full version string (e.g.1.2.3).versionGenericString
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
elementString
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.
- On Windows:
Returns
colorString
The color value in hex format.successBoolean
If the action was successful.messageString
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
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.accentColorString
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.
colorString
Can be one of the following values:bluebrowngraygreenorangepinkpurpleredyellow
Returns
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.colorString
Color in RGBA hexadecimal form.
Get Cursor Point
Returns the current absolute position of the mouse pointer.
await window.deskifier.system.getCursorPoint()
Returns
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.pointElectron.Point
Get Primary Display
Returns details about the system's primary screen.
await window.deskifier.system.getPrimaryDisplay()
Returns
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.displayElectron.Display
Get All Displays
Returns an array of system displays.
await window.deskifier.system.getAllDisplays()
Returns
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.displaysArray 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:
screenIDNumberrotationNumberscaleFactorNumberdisplayFrequencyNumberdisplayHeightNumberdisplayWidthNumberworkAreaHeightNumberworkAreaWidthNumberisPrimaryDisplayBoolean
Get CPU Usage
Gets the current CPU usage percentage for the system.
await window.deskifier.system.getCpuUsage()
Returns
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.cpuUsageNumber
Current CPU usage as a percentage.
Get Memory Info
Gets the system's memory details.
await window.deskifier.system.getMemoryInfo()
Returns
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.totalNumber
The total amount of physical memory in Kilobytes available to the system.freeNumber
The total amount of memory not being used by applications or disk cache.totalHumanString
The total amount of physical memory in Kilobytes available to the system, formatted as human readable (ex. "128mb")freeHumanString
The total amount of memory not being used by applications or disk cache., formatted as human readable (ex. "128mb")swapTotalNumber Linux Windows
The total amount of swap memory in Kilobytes available to the system.swapFreeNumber 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
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.ProcessMemoryInfoElectron.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
successBoolean
If the action was successful.messageString
Additional confirmation, or error details if action was unsuccessful.idleTimeNumber
Events
Display Added
Fires when a new display is detected.
window.deskifier.system.onDisplayAdded((display) => { })
Arguments
displayElectron.Display
The newly added display.
Display Removed
Fires when a display is removed.
window.deskifier.system.onDisplayRemoved((display) => { })
Arguments
displayElectron.Display