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.tsx7
-rw-r--r--src/patcher.ts4
3 files changed, 13 insertions, 0 deletions
diff --git a/src/api/settings.ts b/src/api/settings.ts
index 4cdb24b..d20e964 100644
--- a/src/api/settings.ts
+++ b/src/api/settings.ts
@@ -32,6 +32,7 @@ export interface Settings {
enableReactDevtools: boolean;
themeLinks: string[];
frameless: boolean;
+ transparent: boolean;
winCtrlQ: boolean;
plugins: {
[plugin: string]: {
@@ -48,6 +49,7 @@ const DefaultSettings: Settings = {
themeLinks: [],
enableReactDevtools: false,
frameless: false,
+ transparent: false,
winCtrlQ: false,
plugins: {}
};
diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx
index e1632b1..9f55d57 100644
--- a/src/components/VencordSettings/VencordTab.tsx
+++ b/src/components/VencordSettings/VencordTab.tsx
@@ -108,6 +108,13 @@ function VencordSettings() {
>
Disable the window frame
</Switch>
+ <Switch
+ value={settings.transparent}
+ onChange={(v: boolean) => settings.transparent = v}
+ note="Requires a full restart"
+ >
+ Enable window transparency
+ </Switch>
{navigator.platform.toLowerCase().startsWith("win") && (
<Switch
value={settings.winCtrlQ}
diff --git a/src/patcher.ts b/src/patcher.ts
index 64bc502..d51405d 100644
--- a/src/patcher.ts
+++ b/src/patcher.ts
@@ -80,6 +80,10 @@ if (!process.argv.includes("--vanilla")) {
if (settings.frameless) {
options.frame = false;
}
+ if (settings.transparent) {
+ options.transparent = true;
+ options.backgroundColor = "#00000000";
+ }
process.env.DISCORD_PRELOAD = original;