Skip to content

Follow the Omarchy theme in the fcitx5 candidate window - #12142

Closed
akitaonrails wants to merge 2 commits into
omacom:quattrofrom
akitaonrails:fcitx5-theme
Closed

akitaonrails wants to merge 2 commits into
omacom:quattrofrom
akitaonrails:fcitx5-theme

Conversation

@akitaonrails

Copy link
Copy Markdown

Summary

  • add default/themed/fcitx5-theme.conf.tpl, so every theme generates an fcitx5 candidate-window theme from its own palette
  • add omarchy-theme-set-fcitx5 to install it and point classicui at it, wired into post_theme_commands
  • cover it with a shell test

Why

Everything else in a session follows the selected theme; the input-method popup does not. A user typing Japanese or Chinese gets fcitx5's stock default theme — light grey panel, blue highlight — floating over whatever Omarchy theme is active. It is the one window that never matches.

This generates a theme per palette instead of shipping a fixed one, so the popup tracks light and dark themes alike:

Theme Panel Highlight
Tokyo Night #1a1b26 #7aa2f7
Ristretto #2c2525 #f38d70
Catppuccin Latte #eff1f5 #1e66f5

accent and background sit at opposite ends of a palette's luminance in both light and dark themes, so candidate text on the highlight bar stays legible without per-theme tuning.

The template also sets the panel's margins (12/8 text padding, highlight inset), which is the other half of the problem: the stock 5px padding reads as cramped and misaligned next to the rest of Omarchy.

What it deliberately does not touch

omarchy-theme-set-fcitx5 rewrites only Theme= and DarkTheme= in ~/.config/fcitx5/conf/classicui.conf, appending them if absent. Font, candidate-list orientation, DPI handling and tray settings are the user's and are left exactly as found — CJK users tend to have opinions about the font, and a theme switch is the wrong moment to overrule them.

Both keys are set because DarkTheme is what classicui picks when the user follows the system colour scheme; setting only Theme leaves those users on the stock popup.

This is a different approach from #7894, which copies *.png out of the packaged themes. fcitx5 5.1 ships those images as SVG, so that copy misses the page arrows and the radio glyph, and it also overwrites classicui.conf wholesale. Here the images are copied from the packaged theme by glob (SVG or PNG, whichever the installed fcitx5 has) because Image= entries resolve relative to the theme directory.

Complements #9634: that PR gets Mozc installed and registered, this one makes the window it opens look like Omarchy.

Testing

  • bash test/shell.d/fcitx5-theme-test.sh — no-ops before templates exist; installs theme, images and selection; preserves unrelated classicui settings; replaces rather than appends on re-theme
  • ./test/shell — 7 pre-existing environment failures before and after (config-test, locate-test, plymouth-set-test, runtime-smoke-test, snapper-test, unowned-system-paths-test, omarchy-kernel-migration-test), none introduced here
  • ./test/cli
  • theme-staging-test.sh gates new templates, so fcitx5-theme.conf is registered there as colour-only — it ships no code

Visual verification

Applied on a live Omarchy 4.0.4 session (fcitx5 5.1.22, Hyprland 0.56.2, 4K at scale 1.5) with the Ristretto theme active: the generated theme installed, classicui reloaded over D-Bus without restarting fcitx5, and the Mozc popup came back in Ristretto's warm palette instead of the stock grey — larger, evenly padded, matching the desktop.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds fcitx5 input method theme integration to the theme system.

The PR appears safe to merge based on the new changes reviewed.

Summary

The PR generates an fcitx5 candidate-window theme from the active palette and synchronizes classicui when the Omarchy theme changes.

  • It adds a fallback for packaged PNG glyphs, preserves non-theme classicui settings, and releases Omarchy-owned selections when no palette is generated.
  • It adds shell coverage for installation, re-theming, user selections, and the no-palette path.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Select Omarchy theme] --> B{Palette generated?}
  B -- Yes --> C[Install fcitx5 theme and glyphs]
  C --> D[Update eligible classicui selections]
  B -- No --> E[Release Omarchy classicui selections]
  D --> F[Reload classicui]
  E --> F
Loading

Reviews (2) · Last reviewed commit: "Keep a chosen fcitx5 theme and release a..."

Comment thread default/themed/fcitx5-theme.conf.tpl Resolved
Comment thread bin/omarchy-theme-set-fcitx5 Resolved
Comment thread bin/omarchy-theme-set-fcitx5 Resolved
AkitaOnRails and others added 2 commits October 6, 2026 12:27
Theme sync replaced any classicui theme on every switch, kept the previous
palette when the new theme generated none, and named SVG glyphs a fcitx5
that ships PNG does not have.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@omarchybot

Copy link
Copy Markdown
Collaborator

Thank you for this. The work is carried forward in #15508, which brings the still-missing parts of Japanese, Chinese and Korean setup together into one change, so I am closing this in its favour.

Theming the Fcitx candidate window is in #15508, credited to you as co-author, using your palette. It renders through the theme template mechanism and fixes five things the branch hit on quattro: new installs were not themed (headless theme set skips the retint list), existing installs needed a migration, sed -i replaced a symlinked classicui.conf, the busctl reload could start Fcitx, and the hook list has been renamed. Highlighted preedit was accent on accent, which made it invisible; it now uses the background colour.

This was checked against quattro by Claude, with Codex at medium effort verifying the claims above. If something here is not covered after all, say so and this can be reopened.

@omarchybot omarchybot closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants