Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

[TODO] Add Theme Settings as seen in the latest release cadidate for BetterDiscord, for support in Future Versions. #17

@GH0STP4WZ

Description

@GH0STP4WZ

An example of which can be seen here.

/**
 * @name DevTheme
 * @description Development theme for testing
 * @author Zerebos
 * @version 1.0.0
 *
 * @var checkbox fontEnable "Text Shadow: Enables text to have shadows" 0
 * @var range    fontSize   "Text Size"    [1, 0.1, 2, 0.01]
 * @var color    fontColor  "Text Color"   #ccc
 * @var select   fontName   "Font"    ["Arial", "Consolas*", "Times New Roman"]
 * @var text     bkgdImg    "Modal Background"   var(--modal-background)
 */

* {
  color: var(--fontColor)!important;
  font-size: calc(var(--fontSize) * 1em)!important;
  font-family: var(--fontName);
  /* offset-x | offset-y | blur-radius | color */
  text-shadow: calc(var(--fontEnable) * 2px) calc(var(--fontEnable) * 2px) calc(var(--fontEnable) * 10px) black;
}


.bd-addon-modal {
  background: var(--bkgdImg, var(--modal-background));
}

A preview of the in-app appearance of such settings:
A preview of the in-app appearance of such settings

The new theme settings will appear under META as @var. With the following formatting.
@var [TypeOfSetting¹] [FlagName²] [TextToDisplay³] [Options⁴]

  1. The type of setting used. The currently known types to me are
  • Checkbox (Self explanatory)
  • Range (Will provide the end user with a slider to set a variable between two different values)
  • Color (Will provide the end user with a color picker to set options such as accent color)
  • Select (Will provide the end user with a Dropdown menu with various options to chose from. Can be used for different styles within a theme, for example, different built-in fonts.)
  • Text (Will provide the end user with a text entry field, can be used for a custom titlebar text, inserting a custom background image through linking a CDN, or setting a querry to fetch certain data for an API of sorts.)
  1. The name of the flag. This can be called as a var() later in the theme.
  2. Self explanatory. Can be used to display a warning or a description about the current setting.
  3. This value depends on the TypeOfSetting value. can be used to set a default value for Checkbox, a range to choose between for Range, a default value for Color, the available option for Select, and a default value for Text.

These settings will be saved in .config/betterdiscord/data/[release-branch]/data under ThemeSettings.json and will be called whenever a theme of a matching name is loaded (see @name).

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationtodothis is planned

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions