Skip to content
Fabian Winter edited this page Nov 9, 2019 · 10 revisions

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.

Advanced configuration

More parameters

You can already let rofi call your script with parameters, by starting it like this: `rofi -modi yourscript:"yourscript.sh first_parameter second_parameter". They will also be included in the last call with the user's choice.

Custom keybindings

It is not possible to have custom keybindings in script mode. (@DaveDavenport: Correct?)

Multi-selection

Also, multi-selection seems not to be possible in script mode. (@DaveDavenport: Correct?)

Clone this wiki locally