Create a new Fcitx Theme

From Fcitx
Jump to navigation Jump to search
This page contains changes which are not marked for translation.


This page tends to describe how to create a new theme for Fcitx 5 Classic User Interface.

Required files

Files should be placed under XDG_DATA_DIR/share/fcitx5/themes/[some directory]/. A good user level place is usually ~/.local/share/fcitx5/themes/.

It need to contain a file theme.conf. You may simply copy theme.conf from default theme.

You need to manually modify the name in a desktop-style field. Other than that, all other fields are accessible via Configtool.

Understand the rendering process

The elements in the input popup window

There are 3 single line text, Auxiliary Text Up, Preedit, Auxiliary Text Down, and a list of candidates in the window.

Input popup has two different layout model, vertical and horizontal as shown in the table below.

Horizontal layout
Auxiliary Text Up Preedit
Auxiliary Text Down Candidate 1 Candidate 2 ... Candidate n


Vertical layout
Auxiliary Text Up Preedit
Auxiliary Text Down
Candidate 1
Candidate 2
...
Candidate n

The context with in the table are laid out side by side. You may think of them wrapped by a text box, with text margin around the text.

The whole context with in the popup are wrapped as a big box, with context margin around the text.


Some idea about creating a theme with irregular shape