Extra Specification
Extras are scripts that handle theme-specific settings that can’t be expressed through the pattern system alone — like setting a VS Code theme, changing the wallpaper, or configuring an IDE color scheme. They live in {desktop}/gtheme/extras/.
How it works
Unlike patterns (which are filled from a universal color palette), extras receive theme-specific arguments defined in each theme’s [extras] section.
For example, the Dracula theme defines:
[extras]vscode = ['Dracula']wallpaper = ['~/.config/gtheme/wallpapers/Dracula/arch-linux-light.png']When this theme is applied, Gtheme runs:
extras/vscode.sh "Dracula"extras/wallpaper.sh "~/.config/gtheme/wallpapers/Dracula/arch-linux-light.png"Example: VS Code
#!/bin/bash
VSCODETHEME="$1"VSCODE_SETTINGS_FILE="$HOME/.config/Code/User/settings.json"
[[ ! -e $VSCODE_SETTINGS_FILE || -z "$VSCODETHEME" ]] && exit 1
sed -i "s|\"workbench.colorTheme\": \".*\"|\"workbench.colorTheme\": \"$VSCODETHEME\"|" \ $VSCODE_SETTINGS_FILEThis script takes the VS Code theme name as an argument and updates settings.json to use it.
Example: Wallpaper
#!/bin/bash
WALLPAPER_URL="$1"[ -z "$WALLPAPER_URL" ] && exit 1
cp "$WALLPAPER_URL" ~/.wallpaperswww img ~/.wallpaper --transition-type any --transition-fps 60Multiple arguments
The [extras] array can contain multiple values. They’re passed as positional arguments to the script:
[extras]my-script = ['arg1', 'arg2', 'arg3']#!/bin/bashecho "$1" # arg1echo "$2" # arg2echo "$3" # arg3Managing extras
Extras can be enabled or disabled per-desktop:
gtheme extra list # List all extrasgtheme extra enable <extra> # Enable an extragtheme extra disable <extra> # Disable an extra