Wiki Table of Contents

HELP: Rofi


Rofi is an X11 pop-up window switcher, run dialog, script launcher and more. It focuses on being fast to use and causing minimal distraction. This Help file describes it as installed in MX-Fluxbox 2.2 and later to function as the run app instead of the native fbrun.


The app can be launched in various ways:

  • Press F2 (mode: run)
  • Click Menu > Run (mode: run)
  • Click Menu > All apps (mode: drun)
  • In terminal: rofi -show run

As set up in MX-Fluxbox, the bottom row (set up by the line in the config file: sidebar-mode: true;) shows the available modes (“modi”) that can be used. Switching mode is accomplished with a mouse click or Ctrl+Tab on the keyboard.

  • drun
    • applications menu with names and icons in desktop files
    • icons enabled in config file (show/hide, icon set)
    • creates Favorites list by sorting frequently used programs on top
    • can not launch apps requiring root access (–> drun)
  • calc
    • the powerful qalc runs in the background
    • standard operators: +, -, *, /, ^, sqrt, etc. (e.g., “22^2 * pi” for area of circle)
    • conversions (e.g., “64km to miles”)
    • currency (e.g., “100 dollars to euros”). The updating of currency information within rofi-calc is currently broken so that currency conversion fails. As a workaround, install qalculate and enter a currency conversion formula such as the one above. That will trigger a successful update of currency information and then rofi-calc will function correctly.
  • window
    • displays open windows for rapid switching
  • run
    • shows all installed files
    • preserves history
    • displays command, not name (e.g., “calc” brings up “localc” not “LibreOffice Calc”)

One of the available modi is not enabled by default in MX-Fluxbox but can be added to the config file if desired.

  • ssh
    • run ssh via ~/.ssh/config

Custom modi can be added using the internal ´script´ mode. Each mode has two parameters “name” and “script.” This is begin used in the default config, for instance, where the calc function is invoked with calc:qalc.


Default: ~/.config/rofi/config.rasi

configuration {

	modi: "drun,calc:qalc,window,run";
	width: 25;
	show-icons: true;
	icon-theme: "papirus";
	lines: 10;
	fake-transparency: true;
	sidebar-mode: true;

@import "/usr/share/rofi/themes/glue_pro_blue.rasi"

Resources for config file: ~/.config/rofi/xresources

Many themes are available for rofi. To see and select them, open a terminal and enter: rofi-theme-selector


1. Edit rofi’s configuration to use MX-FB’s defaults
Open the terminal and type or paste:

 mkdir ~/.config/rofi
 	touch ~/.config/rofi/config.rasi
 	featherpad ~/.config/rofi/config.rasi

In the leafpad window, delete any content and paste this:

configuration {

	modi: "drun,calc:qalc,window,run";
	width: 25;
	show-icons: true;
	icon-theme: "papirus";
	lines: 10;
	fake-transparency: true;
	sidebar-mode: true;

Save the file.

2. Run rofi
Open the terminal and type or paste:

 rofi -show drun

3. Change menu’s “Run” to use rofi
Click Menu > Settings > Configure > Menu. Search for this line:

 	[exec] (Run  F2) {fbrun -nearmouse}

Replace it with this line:

   [exec] (Run  F2) {rofi -show drun}

Save the file

4. Replace F2 key binding to run “rofi” insted of “fbrun”
Click Menu > Settings > Configure > Keys. Search for this line:

Search for this line:

 none F2 :Exec fbrun

Replace it with this line:

   none F2 :Exec  rofi -show drun

Save the file, then click Menu > Leave > Refresh.


v. 20200825

1 thought on “HELP: Rofi”

Leave a Comment

MX Linux