How to use the systeminformation.graphics function in systeminformation

To help you get started, we’ve selected a few systeminformation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Revolutionary-Games / Thrive-Launcher / renderer.js View on Github external
async function checkIfCompatible() {
    try {
        playButtonText.textContent = "Checking graphics hardware...";

        const data = await si.graphics();
        const identifier = ["nvidia", "advanced micro devices", "amd"]; // And so on...

        for(let i = 0; i < data.controllers.length; i++){

            const vendor = data.controllers[i].vendor.toLowerCase();

            cardsModel.push(" " + data.controllers[i].model);

            // Is incompatible if Intel is found in a substring
            if(vendor.includes("intel")){

                console.log("hardware is not compatible");
                showIncompatiblePopup = true;
            }

            for(let n = 0; n < identifier.length; n++){
github gitduckhq / vscode-extension / src / recorder / windows.ts View on Github external
static async getScreens(): Promise {
        const {displays} = await systemInfo.graphics();
        console.log('Fetching Windows screens', displays);

        return displays.map((display, i) => {
            return {
                index: i,
                name: display.main ? 'Main screen' : 'Screen ' + i,
                type: InputDeviceType.Screen,
                resolution: {
                    x: Number(display.resolutionx),
                    y: Number(display.resolutiony),
                },
                offset: {
                    x: Number(display.positionX),
                    y: Number(display.positionY),
                }
            }
github dreamnettech / dreamtime / src / electron / src / modules / tools / system.js View on Github external
async setup() {
    const [
      graphics,
      os,
      cpu,
      mem,
      online,
    ] = await Promise.all([
      si.graphics(),
      si.osInfo(),
      si.cpu(),
      si.mem(),
      isOnline(),
    ])

    this._graphics = graphics
    this.os = os
    this.cpu = cpu
    this.memory = mem
    this.online = online

    logger.info(`GPU devices: ${this.graphics.length}`)
    logger.info(`RAM: ${this.memory.total} bytes.`)
    logger.info(`Internet connection: ${this.online}`)
    logger.debug(this)
github sbuggay / sentry / packages / sentry-server-data / src / Server.ts View on Github external
export async function dynamicInfo(): Promise {
	const osData = {
		hostname: os.hostname(),
		uptime: os.uptime(),
		freemem: os.freemem(),
		totalmem: os.totalmem(),
		cpus: os.cpus(),
		loadavg: os.loadavg()
	}

	const promises = [
		si.battery(),
		si.graphics(),
		si.osInfo(),
		si.fsSize(),
		si.cpuTemperature()
	];

	const [battery, graphics, osInfo, fsSize, cpuTemp] = await Promise.all(promises);
	return {
		...osData,
		battery,
		graphics,
		osInfo,
		fsSize,
		cpuTemp
	};

}
github dreamnettech / dreamtime / src / electron / src / scripts / tools / system.js View on Github external
async setup() {
    const [
      graphics,
      cpu,
      mem,
      online,
    ] = await Promise.all([
      si.graphics(),
      si.cpu(),
      si.mem(),
      isOnline(),
    ])

    this._graphics = graphics
    this._cpu = cpu
    this._memory = mem
    this.online = online
  }