Skip to main content

Theme System

Config-Sway features a unified theme system that synchronizes colors, styles, and wallpapers across all components: Sway, Waybar, Kitty, and Rofi. One command switches everything instantly.

How It Works

Quick Theme Switching

Press Super + A to open the theme switcher. Select a theme and all components update automatically:
  • Sway: Window borders, gaps, and focus colors
  • Waybar: Status bar colors and styles
  • Kitty: Terminal color scheme
  • Rofi: Menu colors and styling
  • Wallpaper: Desktop background
The theme switcher shows preview images (wallpapers) for each theme, making it easy to see what you’re selecting.

Theme Directory Structure

Built-in Themes

Color Scheme: Catppuccin Mocha-inspired
~/.config/themes/Anime/sway/theme.conf
Characteristics:
  • Dark purple-blue background
  • Bright blue accents for active windows
  • Catppuccin color palette
  • Anime-style wallpaper
Color Scheme: Dark gray and white
~/.config/themes/Batman/sway/theme.conf
Characteristics:
  • Nearly black background
  • White/light gray active borders
  • Minimalist dark aesthetic
  • Batman-themed wallpaper
Color Scheme: Matrix-style green on blackCharacteristics:
  • Terminal/hacker aesthetic
  • Green accent colors
  • Black background
  • Code/terminal-themed wallpaper
Characteristics:
  • Pure dark mode
  • Minimal distractions
  • High contrast
  • Simple dark wallpaper
Characteristics:
  • Red and blue color scheme
  • Bold, vibrant colors
  • Superman-themed wallpaper
Characteristics:
  • Windows 10-inspired colors
  • Blue accent colors
  • Familiar Windows aesthetic
  • Windows 10 default wallpaper

Theme Components

Sway Configuration

File: <theme>/sway/theme.conf Defines window manager appearance:
The main Sway config (~/.config/sway/config) includes this file with:

Waybar Styling

Files:
  • <theme>/waybar/colors.css - Color variable definitions
  • <theme>/waybar/style.css - CSS styling rules
  • <theme>/waybar/config.jsonc - Optional custom layout

Color Variables

~/.config/themes/Anime/waybar/colors.css

Style Import

~/.config/waybar/style.css

Kitty Terminal Colors

File: <theme>/kitty/kitty.conf Each theme provides a complete Kitty configuration with color overrides:
~/.config/themes/Batman/kitty/kitty.conf
The colors.ini file (if present) defines the 16 terminal colors.

Rofi Menu Colors

File: <theme>/rofi-style/_core/palette.rasi
~/.config/themes/Anime/rofi-style/_core/palette.rasi
If a theme doesn’t include a Rofi palette, the theme switcher automatically generates one from the Sway theme colors.

Wallpaper

File: <theme>/wallpaper.{jpg,png,webp} Each theme must include a wallpaper image. Supported formats:
  • JPEG (.jpg)
  • PNG (.png)
  • WebP (.webp)
The theme switcher checks for wallpapers in this order.

Theme Switcher Script

How It Works

The theme-switcher.sh script performs these steps:
1

Scan for themes

Lists all directories in ~/.config/themes/
2

Show preview menu

Displays Rofi menu with wallpaper images as icons
3

Backup current config

Creates timestamped backups:
  • ~/.config/kitty.bak-20260305-143022
  • ~/.config/waybar.bak-20260305-143022
  • ~/.config/sway/theme.conf.bak-20260305-143022
4

Copy theme files

Copies configuration from selected theme to active directories
5

Adapt for Sway

Converts Waybar config from Hyprland to Sway:
6

Generate Rofi palette

If no Rofi palette exists, extracts colors from Sway theme:
7

Apply wallpaper

8

Reload components

9

Save current theme

Creating a Custom Theme

Step-by-Step Guide

1

Create theme directory

2

Define Sway colors

Create ~/.config/themes/MyTheme/sway/theme.conf:
3

Create Waybar colors

Create ~/.config/themes/MyTheme/waybar/colors.css:
4

Copy Waybar style (optional)

Or create a custom one.
5

Configure Kitty

Create ~/.config/themes/MyTheme/kitty/kitty.conf:
6

Add wallpaper

7

Test the theme

Press Super + A and select “MyTheme”
Rofi palette is optional - the theme switcher will auto-generate one from your Sway colors if you don’t provide rofi-style/_core/palette.rasi.

Color Consistency Tips

Using a Color Scheme Generator

  1. Choose a base palette (e.g., from Catppuccin)
  2. Define core colors:
    • Background (dark)
    • Foreground (text)
    • Accent (active elements)
    • Inactive (dimmed elements)
  3. Apply consistently across all configs

Example Color Mapping

Theme Troubleshooting

Check for missing files:
Required:
  • sway/theme.conf
  • wallpaper.{jpg,png,webp}
Optional (auto-generated if missing):
  • waybar/colors.css
  • waybar/style.css
  • kitty/kitty.conf
  • rofi-style/_core/palette.rasi
Force Waybar reload:
Check if colors.css was copied:
Regenerate Rofi palette:
Then switch theme again with Super + A.
Check wallpaper file exists:
Manually set wallpaper:
The theme switcher creates timestamped backups. Clean old ones:
This removes backups older than 30 days.

Advanced Theme Features

Per-Theme Waybar Layouts

Some themes may include custom waybar/config.jsonc with different module arrangements:
This overrides the default layout when that theme is active.

Dynamic Palette Generation

When auto-generating Rofi colors, the theme switcher intelligently picks values:

Font Customization

Themes can specify custom fonts in Sway config:
The Rofi palette generator extracts this:

Sway Theme Settings

Window border and gap configuration

Waybar Styling

Status bar colors and CSS

Kitty Colors

Terminal color schemes

Rofi Menus

Menu styling and color palettes

Theme Resources

Color Palette Inspiration

Wallpaper Sources

Keep wallpaper file sizes reasonable (under 5MB) to avoid slowdowns when switching themes.