Skip to content

Theme Specification

Themes are TOML files stored in ~/.config/gtheme/themes/themes/. Each file defines a color scheme and optional extras.

Example

Here’s the Dracula theme:

name = 'Dracula'
[extras]
intellij-idea = ['Dracula Colorful']
vscode = ['Dracula']
wallpaper = ['~/.config/gtheme/wallpapers/Dracula/arch-linux-light.png']
[colors]
background = '1e1f28'
foreground = 'f8f8f2'
cursor = 'bbbbbb'
selection-background = '44475a'
selection-foreground = '1e1f28'
black = '000000'
black-hg = '545454'
red = 'ff5555'
red-hg = 'ff5454'
green = '50fa7b'
green-hg = '50fa7b'
yellow = 'f0fa8b'
yellow-hg = 'f0fa8b'
blue = 'bd92f8'
blue-hg = 'bd92f8'
magenta = 'ff78c5'
magenta-hg = 'ff78c5'
cyan = '8ae9fc'
cyan-hg = '8ae9fc'
white = 'bbbbbb'
white-hg = 'ffffff'

Structure

name

The display name of the theme. This value is available in patterns as <[theme-name]>.

[colors]

Defines the 19 standard color variables. All values must be valid hex colors without the # prefix.

See Color Variables for the complete list of required variables.

[extras]

Defines theme-specific arguments passed to extra scripts. Each key matches an extra script name, and the value is an array of arguments.

[extras]
vscode = ['Dracula']
wallpaper = ['~/.config/gtheme/wallpapers/Dracula/arch-linux-light.png']

When a theme is applied, Gtheme executes each matching extra script with the provided arguments. For example, the above would run:

Terminal window
extras/vscode.sh "Dracula"
extras/wallpaper.sh "~/.config/gtheme/wallpapers/Dracula/arch-linux-light.png"

Creating a theme

Generate a skeleton theme file with:

Terminal window
gtheme theme new-skeleton <name>

Then fill in the color values. See Creating Themes for a full walkthrough.