tofi(5)
π tofi(5) β the configuration file, bestie β¨
okay so this is the tofi(5) manual page (File Formats Manual, if you're fancy) and it's literally just the config file. no cap, it's the easiest part of the whole vibe. let's get into it π«Ά
πΈ NAME πΈ
tofi β configuration file. that's it, that's the name, she's simple and iconic π
β¨ DESCRIPTION β¨
so the config file format is your basic .ini/.cfg style, and honestly? she ate. you set options one per line, like this:
option = value
whitespace is ignored (the config file does not care about your formatting choices, unlike your group chat π). but bestie, if your value starts or ends with whitespace, you gotta wrap it in double quotes so it doesn't get eaten, like:
option = " value "
lines starting with # or ; are treated as comments β go off, annotate your heart out π. section headers in the form [header] are currently ignored (they're giving decorative, we love a structural no-op).
all options and values are case-insensitive, except where that's literally not possible (e.g. paths β paths are main character and stay exactly as written). later options override earlier ones, and command line options override config file options. last one in wins, periodt π
π SPECIAL OPTIONS π
include=pathβ include the contents of another config file. ifpathis a relative path, it gets interpreted as relative to this config file's path (or the current directory if--includeis passed on the command line). inclusion happens immediately, before the rest of the current file's contents are parsed. it's giving "read this before you read the rest of me" π
π¦ BEHAVIOUR OPTIONS π¦
this is the big section, hydrate before you scroll π
hide-cursor=true|falseβ hide the mouse cursor.
Default: false
text-cursor=true|falseβ show a text cursor in the input field. yes, the little blinky guy, we stan β¨
Default: false
history=true|falseβ sort results by number of usages. by default this is only effective in therunanddrunmodes β see thehistory-fileoption for more info iykyk.
Default: true
history-file=pathβ specify an alternate file to read history information from / store history information to. this shouldn't normally be needed, and it's intended to facilitate the creation of custom modes. the default value depends on the current mode, so here's the lil rundown:
Defaults:
tofi: None (no history file)tofi-run:$XDG_STATE_HOME/tofi-historytofi-drun:$XDG_STATE_HOME/tofi-drun-history
fuzzy-match=true|falseβ if true, searching is performed via a simple fuzzy matching algorithm. if false, substring matching is used, weighted to favour matches closer to the beginning of the string. lowkey a whole different personality depending on which one you pick π
Default: false
require-match=true|falseβ if true, require a match to allow a selection to be made. if false, making a selection with no matches will print input to stdout. heads up: indrunmode, this is always true.
Default: true
auto-accept-single=true|falseβ if true, automatically accept a result if it's the only one remaining. and if there's only one result on startup, window creation is skipped altogether β she doesn't even show up, she's too busy slaying π
Default: false
hide-input=true|falseβ if true, typed input will be hidden, and what is displayed (if anything) is determined by thehidden-characteroption. very covert ops of you π΅οΈ
Default: false
hidden-character=charβ replace displayed input characters with char. if char is set to the empty string, input will be completely hidden. this option only has an effect whenhide-inputis set totrue. teamwork, bestie π«Ά
Default: *
drun-launch=true|falseβ if true, directly launch applications on selection when indrunmode. otherwise, just print theExecline of the.desktopfile to stdout.
Default: false
terminal=commandβ the terminal to run terminal programs in when indrunmode. command will be prepended to the the application's command line. this option has no effect ifdrun-launchis set totrue. (yes, the original really does say "the the" β she's quirky like that π)
Default: the value of the TERMINAL environment variable
drun-print-exec=true|falseβ β οΈ WARNING: this option does nothing, and may be removed in a future version of tofi. she's literally just standing there π
Default: true
late-keyboard-init=true|falseβ delay keyboard initialisation until after the first draw to screen. this option is experimental, and will cause tofi to miss keypresses for a short time after launch π. the only reason to use this option is performance on slow systems. consider yourself warned fr fr.
Default: false
multi-instance=true|falseβ if true, allow multiple simultaneous processes. if false, create a lock file on startup to prevent multiple instances from running simultaneously. one of her or none of her π
Default: false
ascii-input=true|falseβ assume input is plain ASCII, and disable some Unicode handling functions. this is faster, but means e.g. a search for"e"will not match"Γ©". speed vs. accents, the eternal struggle π
Default: false
β¨ STYLE OPTIONS β¨
okay bestie, this is the glam section π every little visual detail lives here, and yes, every default matters.
font=fontβ The font to use. If font is a path to a font file, tofi will not have to use Pango or Fontconfig. This greatly speeds up startup, but any characters not in the chosen font will fail to render. If a path is not given, font is interpreted as a font name in Pango format. Default:"Sans".font-size=ptβ Point size of text. Default:24.font-features=featuresβ Comma separated list of OpenType font feature settings to apply. The format is similar to the CSS"font-feature-settings"property. For example,"smcp, c2sc"will turn all text into small caps (if supported by the chosen font). Default:"".font-variations=variationsβ Comma separated list of OpenType font variation settings to apply. The format is similar to the CSS"font-variation-settings"property. For example,"wght 900"will set the weight of a variable font to 900 (if supported by the chosen font). Default:"".background-color=colorβ Color of the background. See COLORS for more information. Default:#1B1D1E.outline-width=pxβ Width of the border outlines. Default:4.outline-color=colorβ Color of the border outlines. See COLORS for more information. Default:#080800.border-width=pxβ Width of the border. Default:12.border-color=colorβ Color of the border. See COLORS for more information. Default:#F92672.text-color=colorβ Color of text. See COLORS for more information. Default:#FFFFFF.prompt-text=stringβ Prompt text. Default:"run: ".prompt-padding=pxβ Extra horizontal padding between prompt and input. Default:0.prompt-color=colorβ Color of prompt text. See COLORS for more information. Default: Same astext-color.prompt-background=colorβ Background color of prompt. See COLORS for more information. Default:#00000000.prompt-background-padding=directionalβ Extra padding of the prompt background. See DIRECTIONAL VALUES for more information. Default:0.prompt-background-corner-radius=pxβ Corner radius of the prompt background. Default:0.placeholder-text=stringβ Placeholder input text. Default:"".placeholder-color=colorβ Color of placeholder input text. See COLORS for more information. Default:#FFFFFFA8.placeholder-background=colorβ Background color of placeholder input text. See COLORS for more information. Default:#00000000.placeholder-background-padding=directionalβ Extra padding of the placeholder input text background. See DIRECTIONAL VALUES for more information. Default:0.placeholder-background-corner-radius=pxβ Corner radius of the placeholder input text background. Default:0.input-color=colorβ Color of input text. See COLORS for more information. Default: Same astext-color.input-background=colorβ Background color of input. See COLORS for more information. Default:#00000000.input-background-padding=directionalβ Extra padding of the input background. See DIRECTIONAL VALUES for more information. Default:0.input-background-corner-radius=pxβ Corner radius of the input background. Default:0.text-cursor-style=bar|block|underscoreβ Style of the text cursor (if shown). Default:bar.text-cursor-color=colorβ Color of the text cursor. Default: same asinput-color.text-cursor-background=colorβ Color of text behind the text cursor whentext-cursor-style=block. Default: same asbackground-color.text-cursor-corner-radius=pxβ Corner radius of the text cursor. Default:0.text-cursor-thickness=pxβ Thickness of the bar and underscore text cursors. Default: font-dependent whentext-cursor-style=underscore,2otherwise.default-result-color=colorβ Default color of result text. See COLORS for more information. Default: Same astext-color.default-result-background=colorβ Default background color of results. See COLORS for more information. Default:#00000000.default-result-background-padding=directionalβ Default extra padding of result backgrounds. See DIRECTIONAL VALUES for more information. Default:0.default-result-background-corner-radius=pxβ Default corner radius of result backgrounds. Default:0.alternate-result-color=colorβ Color of alternate (even-numbered) result text. See COLORS for more information. Default: same asdefault-result-color.alternate-result-background=colorβ Background color of alternate (even-numbered) results. See COLORS for more information. Default: same asdefault-result-background.alternate-result-background-padding=directionalβ Extra padding of alternate (even-numbered) result backgrounds. See DIRECTIONAL VALUES for more information. Default: same asdefault-result-background-padding.alternate-result-background-corner-radius=pxβ Corner radius of alternate (even-numbered) result backgrounds. Default: same asdefault-result-background-corner-radius.num-results=nβ Maximum number of results to display. Ifn = 0, tofi will draw as many results as it can fit in the window. Default:0.selection-color=colorβ Color of selected result. See COLORS for more information. Default:#F92672.selection-match-color=colorβ Color of the matching portion of the selected result. This will not always be shown if thefuzzy-matchoption is set totrue. Any color that is fully transparent (alpha = 0) will disable this highlighting. See COLORS for more information. Default:#00000000.selection-padding=pxβ β οΈ WARNING: This option is deprecated, and will be removed in a future version of tofi. You should use theselection-background-paddingoption instead. Extra horizontal padding of the selection background. Ifpx = -1, the padding will fill the whole window width. Default:0.selection-background=colorβ Background color of selected result. See COLORS for more information. Default:#00000000.selection-background-padding=directionalβ Extra padding of the selected result background. See DIRECTIONAL VALUES for more information. Default:0.selection-background-corner-radius=pxβ Corner radius of the selected result background. Default:0.result-spacing=pxβ Spacing between results. Can be negative. Default:0.min-input-width=pxβ Minimum width of input in horizontal mode. Default:0.width=px|%β Width of the window. See PERCENTAGE VALUES for more information. Default:1280.height=px|%β Height of the window. See PERCENTAGE VALUES for more information. Default:720.corner-radius=pxβ Radius of the window corners. Default:0.anchor=positionβ Location on screen to anchor the window. Supported values aretop-left,top,top-right,right,bottom-right,bottom,bottom-left,left, andcenter. Default:center.exclusive-zone=-1|px|%β Set the size of the exclusive zone. A value of-1means ignore exclusive zones completely. A value of0will move tofi out of the way of other windows' exclusive zones. A value greater than0will set that much space as an exclusive zone. Values greater than0are only meaningful when tofi is anchored to a single edge. Default:-1.output=nameβ The name of the output to appear on, if multiple outputs are present. If empty, the compositor will choose which output to display the window on (usually the currently focused output). Default:"".scale=true|falseβ Scale the window by the output's scale factor. Default:true.margin-top=px|%β Offset from top of screen. See PERCENTAGE VALUES for more information. Only has an effect when anchored to the top of the screen. Default:0.margin-bottom=px|%β Offset from bottom of screen. See PERCENTAGE VALUES for more information. Only has an effect when anchored to the bottom of the screen. Default:0.margin-left=px|%β Offset from left of screen. See PERCENTAGE VALUES for more information. Only has an effect when anchored to the left of the screen. Default:0.margin-right=px|%β Offset from right of screen. See PERCENTAGE VALUES for more information. Only has an effect when anchored to the right of the screen. Default:0.padding-top=px|%β Padding between top border and text. See PERCENTAGE VALUES for more information. Default:8.padding-bottom=px|%β Padding between bottom border and text. See PERCENTAGE VALUES for more information. Default:8.padding-left=px|%β Padding between left border and text. See PERCENTAGE VALUES for more information. Default:8.padding-right=px|%β Padding between right border and text. See PERCENTAGE VALUES for more information. Default:8.clip-to-padding=true|falseβ Whether to clip text drawing to be within the specified padding. This is mostly important for allowing text to be inset from the border, while still allowing text backgrounds to reach right to the edge. Default:true.horizontal=true|falseβ List results horizontally. Default:false.hint-font=true|falseβ Perform font hinting. Only applies when a path to a font has been specified viafont. Disabling font hinting speeds up text rendering appreciably, but will likely look poor at small font pixel sizes. Default:true.
π COLORS π
Colors can be specified in the form RGB, RGBA, RRGGBB or RRGGBBAA, optionally prefixed with a hash (#).
π PERCENTAGE VALUES π
Some pixel values can optionally have a % suffix, like so:
width = 50%
This will be interpreted as a percentage of the screen resolution in the relevant direction.
π DIRECTIONAL VALUES π
Okay so the background box padding of a type of text can be specified by one to four comma separated values, and the meanings are similar to the CSS padding property β iykyk π
:
- One value sets all edges. β¨
- Two values set
(top & bottom),(left & right)edges. π¦ - Three values set
(top),(left & right),(bottom)edges. πΈ - Four values set
(top),(right),(bottom),(left)edges. π
Specifying -1 for any of the values will pad as far as possible in that direction. Itβs giving βgo all the way,β fr fr. ππ
π AUTHORS π
The icon behind this whole thing is Philip Jones <philj56@gmail.com> β obsessed. π«Ά
π SEE ALSO π
Go give these their moment too: tofi(1), dmenu(1) rofi(1) β the whole squad. π
And thatβs the tofi(5) page, bestie β source/version tofi(5), dated 2024-08-06. Stay slay, stay manpage-literate. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: tofi 0.9.1-bp160.1.13 Β· MIT
- opensuse-leap 16.0: tofi 0.9.1-bp160.1.13 Β· MIT
- opensuse-leap 16.0: tofi 0.9.1-bp160.1.13 Β· MIT
- opensuse-leap 16.0: tofi 0.9.1-bp160.1.13 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms