Configuration File

January 6, 2026 · View on GitHub

The configuration file for Sherlock is located at ~/.config/sherlock/config.toml, unless specified otherwise. This file allows you to customize various parameters to tailor Sherlock to your needs. Below, we will explore the available options and their purposes.

Example File: config.toml


Default App Section [default_apps]

KeywordDefaultExplanation
terminalAutomatically detectedMay be required if the TERMINAL environment variable is not set. Specify the executable name of your terminal (e.g., "gnome-terminal", "konsole").
teamsteams-for-linux --enable-features=UseOzonePlatform --ozone-platform=wayland --url {meeting_url}Only required for the teams-event tile to automatically enter a teams meeting. The {meeting_url} will be replaced by the actual teams meeting URL.
calendar_clientthunderbirdSets your calendar client used in event tiles. Currently only thunderbird is supported.
browserAutomatically detectedSets your default browser for bookmark parsing.
mprisNoneSets your preffered mpris device. When multiple devices are active, it will select mpris. Otherwise, it will select the first device.

Units Section [units]

KeywordDefaultExplanation
lengthsmeterSets the default unit for any length calculations.
weightskgSets the default unit for any weight calculations.
volumeslSets the default unit for any volume calculations.
temperaturesCSets the default unit for any temperatues.
currencyeurSets the default currency.

Debug Section [debug]

KeywordDefaultExplanation
try_suppress_errorsfalseIf set to true, errors and warnings will not be displayed when starting the app.
try_suppress_warningsfalseIf set to true, only errors will trigger the error screen at startup, while warnings will be ignored.
app_paths[]Adds custom paths to search for .desktop files. Should be a list of strings.

Appearance Section [appearance]

KeywordDefaultExplanation
width900Sets the width of the main window.
height593Sets the height of the main window.
gsk_renderer"cairo"Specifies the renderer used to display the Sherlock application. During testing, cairo showed the fastest startup times. You can also use ngl, gl, or vulkan based on your system's performance.
recolor_iconsfalseREMOVED
icon_paths[]Defines custom paths for the application to search for icons. This is useful for adding custom icons for commands or aliases through the sherlockalias file.
icon_size22Sets the default icon size for the icons in each tile.
search_icontrueEnables or disables the use of the search icon
use_base_csstrueEnables or disables the extension of Sherlock's default style sheet.
opacity1.0Controls the opacity of the window. Allowed range: 0.1 - 1.0
mod_key_ascii["⇧", "⇧", "⌘", "⌘", "⎇", "✦", "✦", "⌘"]Sets the ascii character for: Shift, Caps Lock, Control, Meta, Alt, Super, Hyper, Fallback in that order.
num_shortcuts5Controls the number of shortcuts displayed. Shortcuts are indicators containing the modifier key and a number. The values are clamped to a value between 0-10

Behavior Section [behavior]

KeywordDefaultExplanationDocumentation
use_xdg_data_dir_iconsfalseIf set to true, Sherlock will append all paths contained in the XDG_DATA_DIRS environment variable to the search paths for the IconTheme. This will result in a noticeable delay on startup.
animatetrueSets if startup animation should play. (Temporarily deprecated)
global_prefixNonePrepends this to every command.
global_flagsNoneAppends these flags to every command.
remember_queryfalseSpecifies whether the last query should maintain in the search bar when you open Sherlock next. Only works in daemonized mode.
n_clicks2Specifies the number of mouse clicks on a tile required to execute the connected command.

Binds Section [binds]

Warning


This section is deprecated since v0.1.15 – use keybinds instead.

The [binds] section allows you to configure additional keybindings for navigation. The values of the binds are specified in the format <modifier>-<key>. For example, control-tab binds the Control key and the Tab key. If you only want to bind a single Key, you only provide <key>. For the modifier key you can only provide `.

KeywordDefaultExplanation
upcontrol+kDefines an additional keybind to switch to the previous item in the list.
downcontrol+jDefines an additional keybind to switch to the next item in the list.
leftcontrol+hDefines an additional keybind to switch to the previous item in the list.
rightcontro+lDefines an additional keybind to switch to the next item in the list.
modifiercontrolDefines the keybind used for shortcuts (<modifier>+<1-5>) and the clearing of the search bar using (modifier+backspace)
exec_inplacecontrol+returnDefines the key bind to execute an item without sherlock closing afterwards.
contextcontrol+iDefines the keybind to open the context menu.
use_lr_navfalseIf set to true, allows you to move the search bar cursor using the left and right arrows.

Available Keys

Key InputConfig Name
<Tab>tab
<Up>up
<Down>down
<Left>left
<Right>right
<PageUp>pgup
<PageDown>pgdown
<End>end
<Home>home
<Esc>escape

Available Modifiers

Key InputConfig Name
<Shift>shift
<Control>control
<Alt>alt
<Super>super
<Lock>lock
<Hyper>hypr
<Meta>meta

Keybinds

The [keybinds] section allows you to configure keybinds for naviagation. The configuration will map a key combination to an internal function such as selecting the next item.

Keybinds are defined in the following manner:

[keybinds]
"mod-key" = "internal_function"

Internal Functions

Function NameFunctionality
item_downSelects the item below the current one.
item_upSelects the item above the current one.
item_leftSelects the item to the left of the current one. In row views, it will do the same as item_up.
item_rightSelects the item to the right of the current one. In row views, it will do the same as item_down.
arg_nextFocuses the next argument field.
arg_prevFocuses the previous argument field.
execExecutes the currently selected row.
exec_inplaceExecutes the currently selected row without closing Sherlock.
multi_selectMarks a row as selected if Sherlock is run using the --multi flag.
toggle_contextToggles the context menu. Note: <esc> will close the context menu too.
clear_barClears the entire search bar of its content.
backspaceClears the current mode whenever the searchbar is empty.
error_pageOpens a view containing any errors.
shortcutExecutes the nth shortcut. Requires the key to be some modifier and end with -<digit>, which is a generic placeholder for any number.
exitDefines a key to close the app.

Key Names

Sherlock uses gtk4's internal key names. However, for simplicity, some key names are changed:

Mod Keys:

GTKSherlock
CONTROL_MASK, Controlctrl
SHIFT_MASK, Shiftshift
LOCK_MASKcaps
ALT_MASK, MOD1_MASKalt
SUPER_MASK, MOD4_MASKmeta
MOD5_MASKmod5

Keys:

GTKSherlock
ISO_left_tabtab
iso_level3_shiftaltgr
Control_Lctrl_l
Control_Rctrl_r

Files Section [files]

This section holds the location for the config files.

Tip

With Sherlock (> 0.1.11), you can use the Sherlock init subcommand to create the default versions for all of these files. To specify a custom location for your config files, you can then use the optional location suffix. E.g. Sherlock init ~/sherlock-configs

KeywordDefaultExplanation
fallback~/.config/sherlock/fallback.jsonSets the location for the fallback.json file
css~/.config/sherlock/main.cssSets the location for the main.css file
alias~/.config/sherlock/sherlock_alias.jsonSets the location for the sherlock_alias.json file
ignore~/.config/sherlock/sherlockignoreSets the location for the sherlockignore file
actions~/.config/sherlock/sherlock_actions.jsonSets the location for the sherlock_actions file

Runtime Section [runtime]

Here you can configure runtime settings. These can be overwritten by flags and are mainly for internal use.

KeywordDefaultExplanationDocumentation
multifalseIf set to true, <TAB> will select items in your list which will then all be executed on return.
display_rawfalseWhen piping content into Sherlock, this flag will make Sherlock interpret the piped string asa continuous one instead of splitting it at "\n" or trying to parse it as json.
centerfalseThis only works in combination with the display_raw key and piping. If enabled, it will center the input.
photo_modefalseIf enabled, will disable Sherlock from closing whenever focus is lost.
daemonizefalseIf set to true, Sherlock will run in daemon mode. This will consume more memory because the rendered application will be kept in memory. Daemonizing will allow faster startup times. Send the open message to socket /tmp/sherlock_daemon.socket to open the window.Daemonizing

Backdrop Section [backdrop]

This section specifies the behavior of the backdrop feature. This feature creates a darkening effect for the content behind Sherlock.

KeywordDefaultExplanation
enablefalseIf set to true, enables a this effect for Sherlock.
opactiy0.9Controls the opacity for the backrop.
edgetopControls the gtk4_layer_shell edge to which the ovverlay is anchored.

Expand Section [expand]

This section specifies the behavior of the expand feature. This feature makes Sherlock expand its height based on the input. The max height for the content will be the one set for the window height.

KeywordDefaultExplanation
enablefalseIf set to true, enables the feature.
edgetopControls the gtk4_layer_shell edge to which Sherlock is anchored.
margin0Conntrols the margin Sherlock has to edge.

Caching Section [caching]

This section configures the caching feature. It is used to fast track parsing of your apps by caching them in a json file.

KeywordDefaultExplanation
enablefalseIf set to true, enables the feature.
cache~/.cache/sherlock/sherlock_desktop_cache.jsonSpecifies the location of the cache file.

Status Bar [status_bar]

KeywordDefaultExplanation
enablefalseIf set to true, enables the feature.

Search Bar Icons [search_bar_icon]

This section configures the icon next to the search bar.

KeywordDefaultExplanation
enablefalseIf set to true, enables the feature.
iconsystem-search-symbolicSets the icon on an empty field
icon_backgo-previous-symbolicSets the icon on search or another page