aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/settings.ts2
-rw-r--r--src/components/VencordSettings/VencordTab.tsx6
-rw-r--r--src/main/patcher.ts5
3 files changed, 13 insertions, 0 deletions
diff --git a/src/api/settings.ts b/src/api/settings.ts
index b88b9f0..35381d8 100644
--- a/src/api/settings.ts
+++ b/src/api/settings.ts
@@ -38,6 +38,7 @@ export interface Settings {
frameless: boolean;
transparent: boolean;
winCtrlQ: boolean;
+ macosTranslucency: boolean;
disableMinSize: boolean;
winNativeTitleBar: boolean;
plugins: {
@@ -72,6 +73,7 @@ const DefaultSettings: Settings = {
frameless: false,
transparent: false,
winCtrlQ: false,
+ macosTranslucency: false,
disableMinSize: false,
winNativeTitleBar: false,
plugins: {},
diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx
index d5ffa91..7bb5353 100644
--- a/src/components/VencordSettings/VencordTab.tsx
+++ b/src/components/VencordSettings/VencordTab.tsx
@@ -48,6 +48,7 @@ function VencordSettings() {
const donateImage = React.useMemo(() => Math.random() > 0.5 ? DEFAULT_DONATE_IMAGE : SHIGGY_DONATE_IMAGE, []);
const isWindows = navigator.platform.toLowerCase().startsWith("win");
+ const isMac = navigator.platform.toLowerCase().startsWith("mac");
const Switches: Array<false | {
key: KeysOfType<typeof settings, boolean>;
@@ -88,6 +89,11 @@ function VencordSettings() {
key: "disableMinSize",
title: "Disable minimum window size",
note: "Requires a full restart"
+ },
+ IS_DISCORD_DESKTOP && isMac && {
+ key: "macosTranslucency",
+ title: "Enable translucent window",
+ note: "Requires a full restart"
}
];
diff --git a/src/main/patcher.ts b/src/main/patcher.ts
index f92a64d..066cb3d 100644
--- a/src/main/patcher.ts
+++ b/src/main/patcher.ts
@@ -85,6 +85,11 @@ if (!IS_VANILLA) {
options.backgroundColor = "#00000000";
}
+ if (settings.macosTranslucency && process.platform === "darwin") {
+ options.backgroundColor = "#00000000";
+ options.vibrancy = "sidebar";
+ }
+
process.env.DISCORD_PRELOAD = original;
super(options);