Wofi's configuration format is very simple, consisting of key value pairs in snake case. The majority of the config options are the command line options, there are however a small handful of options only accessible via wofi's config.
Mode specific options for the built\-in modes are documented in \fBwofi\fR(7). They are placed in the config file in the format \fBmode\-example_opt=val\fR. For example dmenu has an option called \fBparse_action\fR which would be placed in the config as \fBdmenu\-parse_action=true\fR.
Anything following a # is considered to be a comment unless the # is prefixed with a \\. For this reason in order to put a backslash in the config it must be escaped as well giving \\\\.
Most of the options here are the command flags as found in \fBwofi\fR(1) in snake case, however some are unique to the config.
.TP
.Bstyle=\fIPATH\fR
Specifies the CSS file to use as the stylesheet.
.TP
.Bstylesheet=\fIPATH\fR
Specifies the CSS file to use as the stylesheet. This option is NOT the same as \fBstyle\fR. Absolute paths are absolute however relative paths are relative to the wofi config folder location $XDG_CONFIG_HOME/wofi and NOT the current working directory as they are with \fBstyle\fR. They are also NOT relative to the path as specified by \fB\-\-conf\fR. This option comes from rootbar and is probably more confusing than it's worth. You should probably use \fBstyle\fR unless you're sure this is what you want.
.TP
.Bcolor=\fIPATH\fR
Specifies the colors file to use.
.TP
.Bcolors=\fIPATH\fR
Specifies the colors file to use. This option is NOT the same as \fBcolor\fR. Absolute paths are absolute however relative paths are relative to the wofi config folder location $XDG_CONFIG_HOME/wofi and NOT the current working directory as they are with \fBcolor\fR. They are also NOT relative to the path as specified by \fB\-\-conf\fR. This option comes from rootbar and is probably more confusing than it's worth. You should probably use \fBcolor\fR unless you're sure this is what you want.
.TP
.Bshow=\fIMODE\fR
Specifies the mode to run in. A list of modes can be found in \fBwofi\fR(7).
Specifies the cache file to load/store cache, default is $XDG_CACHE_HOME/wofi\-<mode name> where <mode name> is the name of the mode, if $XDG_CACHE_HOME is not specified ~/.cache is used.
Specifies the term to use when running a program in a terminal. This overrides the default terminal run order which is kitty, alacritty, wezterm, foot, termite, gnome\-terminal, weston\-terminal in that order.
Specifies a printf-like string which is used on the entries prior to displaying them. This command is only used to represent the label widget's string, and won't affect the the output of the selected label.
Specifies the orientation, it can be either horizontal or vertical, default is vertical.
.TP
.Bhalign=\fIALIGN\fR
Specifies the horizontal align for the entire scrolled area, it can be any of fill, start, end, or center, default is fill.
.TP
.Bcontent_halign=\fIALIGN\fR
Specifies the horizontal align for the individual entries, it can be any of fill, start, end, or center, default is fill.
.TP
.Bvalign=\fIALIGN\fR
Specifies the vertical align for the entire scrolled area, it can be any of fill, start, end, or center, the default is orientation dependent. If vertical then it defaults to start, if horizontal it defaults to center.
.TP
.Bfilter_rate=\fIRATE\fR
Specifies the rate at which search results are updated in milliseconds, default is 100.
.TP
.Bimage_size=\fISIZE\fR
Specifies the size of images in pixels when images are enabled, default is 32.
Allows for configuring custom exit codes. For example setting key_custom_0=Ctrl-0 will make it so if you press Ctrl-0 wofi will set its exit status to 10. This will not cause wofi to exit, it will only set its exit code for when it does. 20 of these keys are configurable numbered 0-19. The exit status used is 10+n where n is the number attached to key_custom_n. There are no defaults for these. See \fBwofi\-keys\fR(7) for the key codes.
Specifies whether x and y offsets should be calculated using the global compositor space instead of the current monitor. Default is false. This does not play well with locations and using it with them is not advised.
Specifies whether or not wofi should use a GtkSearchEntry or a regular GtkEntry. The search entry has a little search icon and a clear text button that the regular entry lacks. Default is true
Any GTK widget can be selected by using the name of its CSS node, these however might change with updates and are not guaranteed to stay constant. Wofi also provides certain widgets with names and classes which can be referenced from CSS to give access to the most important widgets easily. \fBwofi\fR(7) contains the current widget layout used by wofi so if you want to get into CSS directly using GTK widget names look there for info.
The colors file should be formatted as new line separated hex values. These values should be in the standard HTML format and begin with a hash. These colors will be loaded however wofi doesn't know what color should be used for what so you must reference them from your CSS.
You can reference these from your CSS by doing \-\-wofi\-color<n> where <n> is the line number \- 1. For example to reference the color on line 1 you would do \fB\-\-wofi\-color0\fR.
The colors can also be referenced by doing \-\-wofi\-rgb\-color<n> where <n> is the line number \- 1. The difference between these is the format used to replace the macro.
\-\-wofi\-color<n> is replaced with an HTML color code in the format #FFFFFF. \-\-wofi\-rgb\-color<n> is replaced with comma separated rgb values in the format 255, 255, 255. The correct usage of \-\-wofi\-rgb\-color<n> is to wrap it in rgb() or rgba(). Note that it does not return an alpha value so combining it with rgba() should be done like so \fBrgba(\-\-wofi\-rgb\-color0, 0.8)\fR. This would set the color to line 1 with an opacity of 80%.