philj56/tofi logo

philj56/tofi

Free

Tiny dynamic menu for Wayland

FreeFree tier
Type
Open Source

About philj56/tofi

Tofi is an extremely fast and simple dmenu/rofi replacement for wlroots-based Wayland compositors such as Sway. It is designed for minimal latency, capable of appearing on screen within a single frame when configured correctly. Tofi can function as a dmenu (reading options from stdin and printing the selection to stdout), an executable launcher (tofi-run displays executables under the user's PATH), or a desktop application launcher (tofi-drun reads .desktop files per the Desktop Entry Specification). It offers extensive theming options based on a box model, including customizable borders, rounded corners, text colors, and vertical or horizontal layout. Tofi is open source, lightweight, and available for multiple Linux distributions.

Key Features

Extremely fast startup (within one frame when configured)
Dmenu mode: reads options from stdin, prints selection to stdout
tofi-run: displays executables from the user's PATH
tofi-drun: lists applications from desktop files
Customizable theming with box model (borders, rounded corners, colors)
Supports vertical and horizontal text layout
Works with wlroots-based Wayland compositors (e.g., Sway)
Symlink-based modes for easy invocation

Pros & Cons

Pros
  • Extremely low latency and high performance
  • Lightweight and minimal resource usage
  • Highly customizable appearance
  • Open source and free to use
  • Simple design with multiple operation modes
Cons
  • Only supports wlroots-based Wayland compositors (no X11 support)
  • Limited to basic menu functionality (no plugins or scripting)
  • No built-in window management integration beyond launching

Best For

Replacing dmenu or rofi in Wayland environmentsApplication launcher for Sway and other wlroots compositorsQuickly launching executables from PATHDisplaying and selecting desktop applications

FAQ

How do I install tofi?
Tofi can be installed by building from source with Meson and Ninja. Dependencies include freetype2, harfbuzz, cairo, pango, wayland, and libxkbcommon. On Arch Linux, it is available in the AUR.
How do I use tofi as a launcher in Sway?
Add a key binding to run `tofi-run | xargs swaymsg exec` for executable launcher, or `tofi-drun | xargs swaymsg exec` for desktop application launcher. tofi-drun can also be launched directly with `--drun-launch=true`.
How can I customize the appearance of tofi?
Tofi supports theming via a configuration file. You can customize colors, borders, rounded corners, font, and layout (vertical or horizontal). Several example themes are included in the repository.