Skip to content
Anakael edited this page Jun 15, 2024 · 10 revisions

All the configuration files are placed at the $HOME/.config/yofi folder (/etc/yofi isn't supported!)

Main configuration

Main configuration file called yofi.config specifies the layout, fonts and other stuff that related to the way the app is rendered.

The configuration uses toml syntax. All of the values are optional and default config looks like this:

# Width/height of the app in pixels
width = 400  
height = 512

# If set forces usage of basic window instead of Layer Shell wayland protocol
force_window = false

# if unset, renders window centered
# window_offsets = [500, -50] # in format [top_offset_pixels, left_offset_pixels]

# Similar to CSS border-radius for main window, for more details see corner_radius
# for [input_text]
corner_radius = "0"

# font = "DejaVu Sans"
# or you may use an absolute path, e.g:
# font = "/usr/share/fonts/TTF/DejaVuSans.ttf"
font_size = 24

# Color of the app background
# Colors are specified in 0xRRGGBBAA format
bg_color = 0x272822ee
# Border around background
bg_border_color = 0x131411ff
# bg_border_width = 2.0

# Color for the fonts
# font_color = 0xf8f8f2ff

# HiDPI scaling factor; default is requested from compositor but
# fractional values are truncated, so one may want to set it explicitly.
# scale = 3

# Terminal emulator to use for apps that require terminal.
# Certain apps like vim might not launch unless specified.
#term = "alacritty -e"

# TOML sections are scope config values for a related blocks.
# This one for instance is for input field area.
[input_text]
# font = ...
font_color = 0xf8f8f2ff
bg_color = 0x75715eff

# Margin/padding values are specified as in CSS but only in pixels.
# So it's either a single value for all directions
# or two values: the first for top/bottom and the second for left/right
# or finally four values: for top, right, bottom and left directions respectively.
margin = "5" # equivalent to "5 5 5 5"
padding = "1.7 -4" # equivalent to "1.7 -4 1.7 -4"

# Corner radius is the arc radius for the surrounding input box.
# Similar to border-radius in CSS but only in pixels.
# So it's either a single value for all corners
# or two values: the first for top-left/bottom-right and the second for top-right/bottom-left
# or finally four values: for top-left, top-right, bottom-right and bottom-left respectively.
# By default the radius is a maximal possible value.
# corner_radius = "1 2 3 4"

# Section for items in the search results area.
[list_items]
# font = ...
font_color = 0xf8f8f2ff

# Font color for an item that currently selected
selected_font_color = 0xa6e22eff

# if specified, search matches are emphasized with this color
match_color = 0xe69f66ff

margin = "5 10"

# If set to true hides the desktop actions
hide_actions = false
# Specify left margin for action line
action_left_margin = 60

# Additional spacing between list items.
# By default there's a space around 10 pixels
# the value can be reduced by specifying a negative value
item_spacing = 2

# Spacing between an icon and a text.
icon_spacing = 5

# Sections for the icons. When this section presents, icons are displayed
[icon]
# For now app only supports fixed sized icons and there's no icon up/down-scaling yet.
# More info: https://github.com/l4l/yofi/issues/76#issuecomment-1023631399 
size = 16

# For the icon search path, by default "hicolor" is used which usually not what you want.
theme = "Adwaita"

# If no icon found for an entry, this one will be used instead
fallback_icon_path = "/usr/share/icons/Adwaita/symbolic/categories/applications-engineering-symbolic.svg"

Entries blacklisting

yofi searches default XDG directories for a desktop files and then list these to the user. Eventually certain files are useless and you want to hide these, so simply follow this steps:

  1. Find the desktop filename for an unwanted app. E.g.: grep 'Name=<name-of-the-app>' /usr/share/applications/**/**.
  2. Put this filename to the $HOME/.config/yofi/blacklist (1 line - 1 blacklisted entry).

If you want to modify desktop file somehow, then just copy it to your user app folder (i.e $HOME/.local/share/applications/) with a new filename and then blacklist original file.

Clone this wiki locally