mode Specs - davatorium/rofi GitHub Wiki

Apart from dmenu mode, rofi can be told to call a custom script.

Basic flow

If you start rofi -modi yourscript:yourscript.sh -show yourscript, this happens:

  1. Rofi calls yourscript.sh without parameters.
  2. Your script needs to write its choices to stdout, separated by line breaks (\n).
  3. Rofi shows these entries and allows the user to choose one.
  4. Your script is called again with the chosen entry as its parameter.

Pass extra properties in script mode

Please see the rofi-script manpage.