Skip to content

Instantly share code, notes, and snippets.

@Soapbosnia
Last active May 1, 2024 15:17
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Soapbosnia/5ff2c69f2bdd404aa96df3a3691105dc to your computer and use it in GitHub Desktop.
Save Soapbosnia/5ff2c69f2bdd404aa96df3a3691105dc to your computer and use it in GitHub Desktop.
Enabling native title bar on Discord client

Enabling native title bar on Discord client

  • Step 1: Download 7-ZIP and the ASAR plugin from [ https://www.tc4shell.com/en/7zip/asar/ ]
  • Step 2: After installing 7-ZIP create a new folder inside of its install location called Formats
  • Step 3: Extract the .dll from one of the folders in the archive (x64 or 32) to the Formats folder
  • Step 4: Go to C:\Users\**YourUsername**\AppData\Local\Discord\app-1.0.9007\modules\discord_desktop_core-1\discord_desktop_core (Replace **YourUsername** with your username)
  • Step 5: Open the core.asar file with 7-ZIP and extract its content to a folder of your choice
  • Step 6: Enter the folder and go to the app subdirectory, after that find the file called mainWindow.js or mainScreen.js and open it with a text editor of your choice
  • Step 7: Go to line 419 and change frame: false to frame: true, if you can't find that text press CTRL+F and search for frame: false, it should look like the one attached in the screenshots
  • Step 8: Navigate back to the main directory of the folder, press CTRL+A, right click, select 7-ZIP and click Add to Archive
  • Step 9: Name the new archive core.asar and set the Compression level to 0 - Store
  • Step 10: Close Discord if not already and navigate back to C:\Users\**YourUsername**\AppData\Local\Discord\app-1.0.9007\modules\discord_desktop_core-1\discord_desktop_core (Replace **YourUsername** with your username)
  • Step 11: Replace the core.asar file with the newly created one

Hiding the custom title bar

  • Use a client of your choice (in my case it's not a client but OpenAsar | openasar.dev)
  • Paste the CSS code below inside the client's style/css editor

CSS

[class*=titleBar]{display: none!important}
@Typical0
Copy link

Typical0 commented Dec 7, 2022

install the plugin

@ibnu-ja
Copy link

ibnu-ja commented Feb 2, 2023

on windows, title bar is white even with dark theme enabled. How to fix?

@Soapbosnia
Copy link
Author

Soapbosnia commented Feb 18, 2023

on windows, title bar is white even with dark theme enabled. How to fix?

Impossible, that's just how Windows 10 works (or should I say how older versions of Electron work with native title bars).

@Zycelz
Copy link

Zycelz commented Feb 22, 2023

image

@Jevil7452
Copy link

Good tutorial, but you also should modify the file "popoutWindows.js" so that the voice chat popout will have a frame too.
image

@FrzMtrsprt
Copy link

on windows, title bar is white even with dark theme enabled. How to fix?

Try MicaForEveryone as a workaround.

@CatmanFan
Copy link

The CSS code to hide the titlebar no longer works, neither on the latest versions of BetterDiscord nor OpenAsar. Using Discord 1.0.9021.

@Jevil7452
Copy link

This still works just fine.
But the CSS code to use is:
"[class*=titleBar]{display: none!important}"

@FatalFit
Copy link

image

I am having the same issue.
Screenshot 2024-01-11 020727

@MiraakThuri
Copy link

MiraakThuri commented Feb 2, 2024

Working great, can finally enjoy native W7 title bar for discord (tested on latest x64 (ye u can get x64 now) stable version 1.0.9030) + OpenAsar

working CSS code is: [class*=titleBar]{display: none!important}

@T0biasCZe
Copy link

do not edit the .asar file directly in notepad, you must extract it using 7z
if you edit it directly it shows the code and it seems that it should work, however it will not work and it will throw that error

@Neonixmanidklol
Copy link

image
i need help fixing this

@Soapbosnia
Copy link
Author

image i need help fixing this

Did you follow all the steps correctly? You have to unzip the core.asar file, modify mainWindow.js and then rezip it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment