Skip to main content

Configuration (v1 - Legacy)

Deprecated Configuration Format

Configuration specification version: 1 was an early development format prior to the initial v0.1.0 release.

Public releases from v0.1.0 through v0.5.1 used Configuration v2, and starting in v0.6.0+, hypr-input-switcher uses Configuration v3. This document is preserved for historical reference and internal migration documentation.

👉 Please refer to the Configuration v3 Guide for the current specification.

Overview​

The version: 1 configuration was an early prototype format. It supported basic class-to-input-method mapping with simple notification toggles.

Example v1 Configuration​

version: 1

client_rules:
firefox: chinese
google-chrome: chinese
kitty: english
code: english

notifications:
enabled: true
duration: 2000
show_on_switch: true

Limitations of v1​

The v1 format had several architectural constraints:

  1. No Window Title Matching: Rules were strictly keyed by application class. Windows could not be differentiated by document title or URL.
  2. No Regular Expression Support: Rules required exact class name matches without regex flexibility.
  3. No Layer-Shell Overlay Support: Desktop overlays (such as Omarchy launchers, calculators, or notification widgets) could not be intercepted.
  4. Hardcoded Engine Assumptions: The daemon assumed English was strictly the inactive controller state and non-English was solely handled by Rime schemas.

Upgrading from v1 to v3​

hypr-input-switcher provides built-in migration assistance. When an existing version: 1 configuration is detected, the migration tool upgrades the file into the modern v3 format:

hypr-input-switcher migrate ~/.config/hypr-input-switcher/config.yaml

Migration Transformation​

The migration utility transforms v1 client rules into modern v3 rule objects and synthesizes corresponding input_methods entities:

# Before (v1)
version: 1
client_rules:
firefox: chinese
code: english

# After (v3)
version: 3
input_methods:
english:
engine: keyboard-us
chinese:
engine: rime
client_rules:
- class: firefox
input_method: chinese
- class: code
input_method: english