From f4267aee35780ca68457c428e62d096eda9463eb Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:33:16 -0400 Subject: [PATCH] Fixes --- src/main/mainWindow.ts | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 04c02cdb..9bcafc79 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -4,7 +4,6 @@ * Copyright (c) 2023 Vendicated and Vencord contributors */ -import dbus from "@homebridge/dbus-native"; import { app, BrowserWindow, @@ -546,37 +545,5 @@ export async function createWindows() { } export function getAccentColor(): Promise { - if (process.platform === "linux") { - return new Promise((resolve, reject) => { - const sessionBus = dbus.sessionBus(); - sessionBus - .getService("org.freedesktop.portal.Desktop") - .getInterface( - "/org/freedesktop/portal/desktop", - "org.freedesktop.portal.Settings", - function (err, settings) { - if (err) { - resolve(""); - return; - } - settings.Read("org.freedesktop.appearance", "accent-color", function (err, result) { - if (err) { - resolve(""); - return; - } - const [r, g, b] = result[1][0][1][0]; - const r255 = Math.round(r * 255); - const g255 = Math.round(g * 255); - const b255 = Math.round(b * 255); - - const toHex = (value: number) => value.toString(16).padStart(2, "0"); - const hexColor = `#${toHex(r255)}${toHex(g255)}${toHex(b255)}`; - resolve(hexColor); - }); - } - ); - }); - } else { - return Promise.resolve(`#${systemPreferences.getAccentColor?.() || ""}`); - } + return Promise.resolve(`#${systemPreferences.getAccentColor?.() || ""}`); }