wofi/man/wofi.5

262 lines
13 KiB
Groff
Raw Permalink Normal View History

2020-01-13 21:59:52 -05:00
.TH wofi 5
.SH NAME
wofi \- configuration file and styling
.SH DESCRIPTION
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.
2020-01-13 23:26:29 -05:00
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.
2020-01-13 21:59:52 -05:00
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 \\\\.
2020-01-13 21:59:52 -05:00
.SH CONFIG OPTIONS
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
.B style=\fIPATH\fR
Specifies the CSS file to use as the stylesheet.
.TP
.B stylesheet=\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
.B color=\fIPATH\fR
Specifies the colors file to use.
.TP
.B colors=\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
.B show=\fIMODE\fR
Specifies the mode to run in. A list of modes can be found in \fBwofi\fR(7).
.TP
.B mode=\fIMODE\fR
Identical to \fBshow\fR.
.TP
.B width=\fIWIDTH\fR
Specifies the menu width in pixels or percent of screen size, default is 50%. Pixels are used unless the number ends with a %.
2020-01-13 21:59:52 -05:00
.TP
.B height=\fIHEIGHT\fR
Specifies the menu height in pixels or percent of screen size, default is 40%. Pixels are used unless the number ends with a %.
2020-01-13 21:59:52 -05:00
.TP
.B prompt=\fIPROMPT\fR
Sets the prompt to be display in the search box, default is the name of the mode.
.TP
.B xoffset=\fIOFFSET\fR
Sets the x offset from the location in pixels, default is 0.
.TP
.B x=\fIOFFSET\fR
Identical to \fBxoffset\fR.
.TP
.B yoffset=\fIOFFSET\fR
Sets the y offset from the location in pixels, default is 0.
.TP
.B y=\fIOFFSET\fR
Identical to \fByoffset\fR.
.TP
.B normal_window=\fIBOOL\fR
If true runs wofi in a normal window instead of using wlr\-layer\-shell, default is false.
.TP
.B allow_images=\fIBOOL\fR
If true allows image escape sequences to be processed and rendered, default is false.
.TP
.B allow_markup=\fIBOOL\fR
If true allows pango markup to be processed and rendered, default is false.
.TP
.B cache_file=\fIPATH\fR
2020-01-13 23:26:29 -05:00
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.
2020-01-13 21:59:52 -05:00
.TP
.B term=\fITERM\fR
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.
2020-01-13 21:59:52 -05:00
.TP
.B password=\fICHARACTER\fR
Runs wofi in password mode using the specified character, default is false.
.TP
.B exec_search=\fIBOOL\fR
2020-03-10 01:37:36 -04:00
If true activiating a search with enter will execute the search not the first result, default is false.
2020-01-13 21:59:52 -05:00
.TP
.B hide_scroll=\fIBOOL\fR
If true hides the scroll bars, default is false.
.TP
.B matching=\fIMODE\fR
Specifies the matching mode, it can be either contains, multi-contains, or fuzzy, default is contains.
2020-01-13 21:59:52 -05:00
.TP
.B insensitive=\fIBOOL\fR
If true enables case insensitive search, default is false.
.TP
.B parse_search=\fIBOOL\fR
If true parses out image escapes and pango preventing them from being used for searching, default is false.
.TP
.B location=\fILOCATION\fR
Specifies the location. See \fBwofi\fR(7) for more information, default is center.
.TP
.B no_actions=\fIBOOL\fR
If true disables multiple actions for modes that support it, default is false.
.TP
2020-02-03 01:29:44 -05:00
.B lines=\fILINES\fR
Specifies the height in number of lines instead of pixels.
.TP
2020-02-06 21:22:50 -05:00
.B columns=\fICOLUMNS\fR
Specifies the number of columns to display, default is 1.
.TP
2020-02-07 21:04:37 -05:00
.B sort_order=\fIORDER\fR
Specifies the default sort order. There are currently two orders, default and alphabetical. See \fBwofi\fR(7) for details.
.TP
add switch to use the dark gtk theme Since some time now, GTK3 themes can ship an optional "dark" variant and applications like picture viewers can make use of such a variant to appear dark (to not distract from the picture) without overwriting the current theme (and risking optical breakage). While wofi is not a picture viewer it may still be desirable to use a dark theme, for example to contrast the (light) application displaying in the background. Of course, wofi can already be fully customized through CSS and/or the colors file, but using the existing dark variant may be easier than fully restyling it, if all you want is a darker appearance. The only way to set an arbitrary GTK application to use the dark theme seems to be setting an environment variable, but that bears two problems: For one, one needs to specify the full theme + dark modifier in the variable, so one would have to keep the global GTK theme and the one used by wofi manually in sync. More critical though, the environment variable would be propagated to the programs wofi launches (for now at least). That would lead to all GTK applications launched through wofi to use the dark theme, which may not be desirable. Wofi could also unset that variable before launching a program, but at this point adding a simple switch is probably easier. Side note: It may be that there is some way to configure the CSS file to include the CSS of the dark variant of the current theme, but I have not been able to find out how. Gnome-terminal uses a switch like this too (just with dconf), so this may just be the way to go.
2020-03-03 06:09:55 -05:00
.B gtk_dark=\fIBOOL\fR
If true, instructs wofi to use the dark variant of the current GTK theme (if available). Default is false.
.TP
2020-07-18 16:32:05 -04:00
.B search=\fISTRING\fR
2020-06-14 06:03:00 -04:00
Specifies something to search for immediately on opening
.TP
2020-07-18 16:32:05 -04:00
.B monitor=\fISTRING\fR
Sets the monitor to open on
.TP
.B pre_display_cmd=\fICOMMAND\fR
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.
.TP
2020-01-13 21:59:52 -05:00
.B orientation=\fIORIENTATION\fR
Specifies the orientation, it can be either horizontal or vertical, default is vertical.
.TP
.B halign=\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
.B content_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
.B valign=\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
.B filter_rate=\fIRATE\fR
Specifies the rate at which search results are updated in milliseconds, default is 100.
.TP
.B image_size=\fISIZE\fR
Specifies the size of images in pixels when images are enabled, default is 32.
2020-02-16 00:53:02 -05:00
.TP
.B key_up=\fIKEY\fR
Specifies the key to use in order to move up. Default is Up(Up arrow). See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_down=\fIKEY\fR
2020-03-10 01:37:36 -04:00
Specifies the key to use in order to move down. Default is Down(Down arrow). See \fBwofi\-keys\fR(7) for the key codes.
2020-02-16 00:53:02 -05:00
.TP
.B key_left=\fIKEY\fR
Specifies the key to use in order to move left. Default is Left(Left arrow). See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_right=\fIKEY\fR
Specifies the key to use in order to move right. Default is Right(Right arrow). See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_forward=\fIKEY\fR
Specifies the key to use in order to move forward. Default is Tab. See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_backward=\fIKEY\fR
Specifies the key to use in order to move backward. Default is ISO_Left_Tab(Shift+Tab). See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_submit=\fIKEY\fR
Specifies the key to use in order to submit an action. Default is Return. See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_exit=\fIKEY\fR
Specifies the key to use in order to exit wofi. Default is Escape. See \fBwofi\-keys\fR(7) for the key codes.
2020-02-21 03:17:59 -05:00
.TP
2020-03-11 21:27:44 -04:00
.B key_pgup=\fIKEY\fR
Specifies the key to use in order to move one page up. Default is Page_Up. See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_pgdn=\fIKEY\fR
Specifies the key to use in order to move one page down. Default is Page_Down. See \fBwofi\-keys\fR(7) for the key codes.
.TP
2020-04-06 17:41:12 -04:00
.B key_expand=\fIKEY\fR
Specifies the key to use in order to expand/contract multi-action entires. There is no default. See \fBwofi\-keys\fR(7) for the key codes.
.TP
2020-04-06 18:17:12 -04:00
.B key_hide_search=\fIKEY\fR
Specifies the key to use in order to hide/show the search bar. There is no default. See \fBwofi\-keys\fR(7) for the key codes.
.TP
.B key_copy=\fIKEY\fR
Specifies the key to use in order to copy the action text for the current entry. The default is Ctrl-c. See \fBwofi\-keys\fR(7) for the key codes.
.TP
2024-02-04 18:04:54 -05:00
.B key_custom_(n)=\fIKEY\fR
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.
.TP
.B line_wrap=\fIMODE\fR
Specifies the line wrap mode to use. The options are off, word, char, and word_char. Default is off.
2020-02-25 20:13:32 -05:00
.TP
.B global_coords=\fIBOOL\fR
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.
2020-02-29 04:04:00 -05:00
.TP
.B hide_search=\fIBOOL\fR
Specifies whether the search bar should be hidden. Default is false.
2020-06-16 18:41:28 -04:00
.TP
.B dynamic_lines=\fIBOOL\fR
Specifies whether wofi should be dynamically shrunk to fit the number of visible lines or if it should always stay the same size. Default is false.
2020-07-28 00:49:21 -04:00
.TP
.B layer=\fILAYER\fR
Specifies the layer to open on. The options are background, bottom, top, and overlay. Default is top
.TP
.B copy_exec=\fIPATH\fR
Specifies the executable to pipe copy data into. $PATH will be scanned, this is not passed to a shell and must be an executable. Default is wl-copy.
2022-07-14 00:36:38 -04:00
.TP
.B single_click=\fIBOOL\fR
Specifies whether or not actions should be executed on a single click or a double click. Default is false.
.TP
.B pre_display_exec=\fIBOOL\fR
This modifies the behavior of pre_display_cmd and causes the command in question to be directly executed via fork/exec rather than through the shell.
2024-08-06 22:39:12 -04:00
.TP
.B use_search_box=\fIBOOL\fR
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
2020-01-13 21:59:52 -05:00
.SH CSS SELECTORS
2020-03-10 01:37:36 -04:00
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.
2020-01-13 21:59:52 -05:00
.TP
.B #window
.br
The name of the window itself.
.TP
.B #outer\-box
.br
The name of the box that contains everything.
.TP
.B #input
.br
The name of the search bar.
.TP
.B #scroll
.br
The name of the scrolled window containing all of the entries.
.TP
.B #inner\-box
.br
The name of the box containing all of the entries.
.TP
.B #img
.br
The name of all images in entries displayed in image mode.
.TP
.B #text
.br
The name of all the text in entries.
.TP
.B #unselected
.br
The name of all entries currently unselected. A better way of doing this is to do #entry and combine that with #entry:selected
2020-01-13 21:59:52 -05:00
.TP
.B #selected
.br
The name of all entries currently selected. A better way of doing this is to do #entry:selected
2020-01-13 21:59:52 -05:00
.TP
.B .entry
.br
The class attached to all entries. This is attached to the inside property box and is old, you probably want #entry instead
.TP
.B #entry
.br
The name of all entries.
2023-07-09 05:06:05 -04:00
.TP
.B #expander-box
.br
The name of all boxes shown when expanding entries with multiple actions
2020-01-13 21:59:52 -05:00
.SH COLORS
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%.