Theme Selection
Glass supports both static and dynamic theme configuration. Dynamic themes automatically switch between light and dark variants based on your system appearance.Static Theme
Set a single theme that remains active regardless of system appearance:settings.json
Dynamic Theme
Configure separate themes for light and dark modes:settings.json
Controls theme switching behavior:
"system"- Follows system appearance"light"- Always use the light theme"dark"- Always use the dark theme
Theme to use in light mode
Theme to use in dark mode
Theme Selector
Open the theme selector withCmd+K Cmd+T (macOS) or Ctrl+K Ctrl+T (Linux/Windows) to preview and switch themes interactively. The theme selector provides:
- Live preview - See themes applied in real-time as you navigate
- Fuzzy search - Quickly filter themes by name
- Theme installation - Install new themes from the extensions marketplace
crates/theme_selector/ and supports filtering themes by name with fuzzy matching.
Icon Themes
Glass also supports customizable icon themes for file explorer and UI elements:settings.json
Theme Overrides
You can override specific colors in your active theme:Global Overrides
Apply overrides to the currently active theme:settings.json
Per-Theme Overrides
Apply different overrides for specific themes:settings.json
UI Customization
Customize font sizes and styling for the UI and editor:Controls line spacing in the editor:
"comfortable"- Relaxed spacing (1.618 ratio)"standard"- Standard spacing (1.3 ratio){"custom": 2}- Custom line height multiplier
UI Density
Adjust the spacing and size of UI elements:settings.json
"compact"- Tighter spacing, smaller elements (0.75x)"default"- Standard spacing (1.0x)"comfortable"- Looser spacing, larger elements (1.25x)
Creating Custom Themes
Glass themes are defined using JSON format. Custom themes can be created as extensions and loaded at runtime through the theme registry. The theme system is implemented incrates/theme/ with the following key components:
- ThemeRegistry - Manages theme loading and registration
- ThemeSettings - Stores active theme configuration
- Theme - Contains color definitions and style overrides
- Appearance - Defines light/dark appearance variants
System Integration
Glass respects your system’s appearance settings when using dynamic themes. TheSystemAppearance global tracks the current system appearance and triggers theme updates when the system appearance changes.
Theme changes are observed through the SettingsStore and automatically applied to all windows and UI components.