The Scenario

If you’re anything like me, you use Discord for things, and if you use their “Official” Linux electron client you know what a wonderful piece of software it is, and how the developers have helpfully chosen default window/panel sizes for you, because obviously they use your computer, and know what your screen configurations, preferred window arrangement, and everything else are.

Now, you can certainly go to a third party client/mod like Vencord, or BetterDiscord, both perfectly valid choices.

The Problem

My problem was that I was on my old Thinkpad T420 last night, and booted into Bluefin which uses GNOME for it’s desktop, that laptop has a 1600x900 display, and I wanted to half-tile Discord and ptyxis on the workspace. This should be nice and easy, focus Discord, hit Meta+left arrow, then focus ptyxis and hit Meta+right arrow.

Except that doesn’t work, ptyxis half-tiles to the right just fine, Discord on the other hand, has hardcoded “minimum window sizing” in the client. For whatever reason, my websearch-fu was failing me last night. Damnit.

The Solution

Modify the Discord client, of course.

I use the Discord Flatpak so if you’re using some other packaging, the path to this file might be different.

The file to edit

The file I need to edit is: ~/.var/app/com.discordapp.Discord/config/discord/settings.json

The things to change

I added the following to the file:

 {

    "IS_MAXIMIZED": false,

    "IS_MINIMIZED": false,

    "MIN_WIDTH": 0,  //this line is important

    "MIN_HEIGHT": 0,  // this line is also important

    "WINDOW_BOUNDS": {

    "x": 500,

    "y": 23,

    "width": 940,

    "height": 877

    }

The Result

Now Discord resizes to whatever the hell I tell it to. Which is a good thing.

Credit

Thanks to @Von.dev on the Universal Blue Discord for pointing me in the right direction