1ROFI(1)                     General Commands Manual                    ROFI(1)
2
3
4

NAME

6       rofi  -  A window switcher, application launcher, ssh dialog, dmenu re‐
7       placement and more
8
9

SYNOPSIS

11       rofi [ -show mode ]|[ -dmenu ]|[ -e msg ] [ CONFIGURATION ]
12
13

DESCRIPTION

15       rofi is an X11 pop-up window switcher, run dialog,  dmenu  replacement,
16       and more. It focuses on being fast to use and have minimal distraction.
17       It supports keyboard and mouse navigation, type  to  filter,  tokenized
18       search and more.
19
20

USAGE

22       rofi's  main  functionality is to assist in your workflow, allowing you
23       to quickly switch between windows, start applications or log into a re‐
24       mote  machine via ssh.  There are different modi for different types of
25       actions.
26
27
28       rofi can also function as (drop-in) replacement for dmenu(1).
29
30
31   Running rofi
32       To launch rofi directly in a certain mode, specify  a  mode  with  rofi
33       -show <mode>.  To show the run dialog:
34
35
36              rofi -show run
37
38
39
40   Emulating dmenu
41       rofi  can  emulate dmenu(1) (a dynamic menu for X11) when launched with
42       the -dmenu flag.
43
44
45       The  website  for  dmenu  can   be   found   here   ⟨http://tools.suck
46       less.org/dmenu/⟩.
47
48
49       rofi  does  not  aim to be 100% compatible with dmenu. There are simply
50       too many flavors of dmenu.  The idea  is  that  the  basic  usage  com‐
51       mand-line flags are obeyed, theme-related flags are not.  Besides, rofi
52       offers some extended features (like multi-select, highlighting, message
53       bar, extra key bindings).
54
55
56   Display Error message
57       rofi error dialog can also be called from the command line.
58
59
60              rofi -e "my message"
61
62
63
64       Markup support can be enabled, see CONFIGURATION options.
65
66

CONFIGURATION

68       There  are  currently  three  methods  of setting configuration options
69       (evaluated in order below):
70
71
72              • System configuration file  (for example  /etc/rofi.rasi).   It
73                first  checks  XDG_CONFIG_DIRS,  and  then SYSCONFDIR (that is
74                passed at compile time).  It loads the first  config  file  it
75                finds, it does not merge multiple system configuration files.
76
77              • Rasi  theme file: The new theme format can be used to set con‐
78                figuration values.
79
80              • Command-line options: Arguments passed to rofi.
81
82
83
84       To get a template config file, run: rofi -dump-config > config.rasi
85
86
87       This will contain (commented) all current configuration options,  modi‐
88       fied options are uncommented.
89
90
91       The configuration system supports the following types:
92
93
94              • string
95
96              • integer (signed and unsigned)
97
98              • char
99
100              • boolean
101
102              • lists
103
104
105
106       For the syntax of these options, see the rofi-theme(5) manpage.
107
108
109       For  use  on  the command line, Boolean options have a non-default com‐
110       mand-line syntax. Example to enable option X:
111
112
113              -X
114
115
116
117       To disable option X:
118
119
120              -no-X
121
122
123
124       Below is a list of the most important options:
125
126
127   General
128       -help
129
130
131       The help option shows the full list of  command-line  options  and  the
132       current  set  values.   These  include dynamic (run-time generated) op‐
133       tions.
134
135
136       -version
137
138
139       Show the rofi version and exit.
140
141
142       -dump-config
143
144
145       Dump the current active configuration, in rasi format,  to  stdout  and
146       exit.    Information  about  the  rasi  format  can  be  found  in  the
147       rofi-theme(5) manpage.
148
149
150       -dump-theme
151
152
153       Dump the current active theme, in rasi format, to stdout and exit.
154
155
156       -rasi-validate filename
157
158
159       Try to parse the file and  return  0  when  successful,  non-zero  when
160       failed.
161
162
163       -threads num
164
165
166       Specify the number of threads rofi should use:
167
168
169              • 0: Autodetect the number of supported hardware threads.
170
171              • 1: Disable threading
172
173
174
175
176              2..n: Specify the maximum number of threads to use in the thread
177              pool.
178
179              Default:  Autodetect
180
181
182
183       -display display
184
185
186       The X server to contact. Default is $DISPLAY.
187
188
189       -dmenu
190
191
192       Run rofi in dmenu mode. This allows for interactive scripts.  In  dmenu
193       mode,  rofi  reads from STDIN, and output to STDOUT.  A simple example,
194       displaying three pre-defined options:
195
196
197              echo -e "Option #1\nOption #2\nOption #3" | rofi -dmenu
198
199
200
201       Or get the options from a script:
202
203
204               /my_script.sh | rofi -dmenu
205
206
207
208       -show mode
209
210
211       Open rofi in a certain mode. Available modes  are  window,  run,  drun,
212       ssh, combi.  The special argument keys can be used to open a searchable
213       list of supported key bindings (see KEY BINDINGS)
214
215
216       To show the run-dialog:
217
218
219              rofi -show run
220
221
222
223       If -show is the last option passed to rofi, the first enabled  modi  is
224       shown.
225
226
227       -modi mode1,mode2
228
229
230       Specify  an  ordered, comma-separated list of modes to enable.  Enabled
231       modes can be changed at runtime. Default key is Ctrl+Tab.  If no  modes
232       are  specified, all configured modes will be enabled.  To only show the
233       run and ssh launcher:
234
235
236              rofi -modi "run,ssh" -show run
237
238
239
240       Custom modes can be added using the internal  script  mode.  Each  such
241       mode has two parameters:
242
243
244              <name>:<script>
245
246
247
248       Example:    Have    a    mode    called    'Workspaces'    using    the
249       i3_switch_workspaces.sh script:
250
251
252              rofi -modi "window,run,ssh,Workspaces:i3_switch_workspaces.sh" -show Workspaces
253
254
255
256       Notes: The i3 window manager dislikes commas in the command when speci‐
257       fying an exec command.  For that case, # can be used as a separator.
258
259
260       TIP: The name is allowed to contain spaces:
261
262
263              rofi -modi "My File Browser:fb.sh" -show "My File Browser"
264
265
266
267       -case-sensitive
268
269
270       Start  in  case-sensitive mode.  This option can be changed at run-time
271       using the -kb-toggle-case-sensitivity key binding.
272
273
274       -cycle
275
276
277       Cycle through the result list. Default is 'true'.
278
279
280       -filter filter
281
282
283       Filter the list by setting text in input bar to filter
284
285
286       -config filename
287
288
289       Load an alternative configuration file.
290
291
292       -cache-dir filename
293
294
295       Directory that is used to place temporary files, like history.
296
297
298       -scroll-method method
299
300
301       Select the scrolling method. 0: Per page, 1: continuous.
302
303
304       -normalize-match
305
306
307       Normalize the string before matching, so o will match ö, and é  matches
308       e.
309       This  is  not a perfect implementation, but works. For now, it disables
310       highlighting of the matched part.
311
312
313       -no-lazy-grab
314
315
316       Disables lazy grab, this forces the keyboard being grabbed  before  gui
317       is shown.
318
319
320       -no-plugins
321
322
323       Disable plugin loading.
324
325
326       -plugin-path directory
327
328
329       Specify the directory where rofi should look for plugins.
330
331
332       -show-icons
333
334
335       Show application icons in drun and window modes.
336
337
338       -icon-theme
339
340
341       Specify  icon theme to be used.  If not specified default theme from DE
342       is used, Adwaita and gnome themes act as fallback themes.
343
344
345       -fallback-application-icon
346
347
348       Specify an icon to be used when the application icon  in  run/drun  are
349       not yet loaded or is not available.
350
351
352       -markup
353
354
355       Use Pango markup to format output wherever possible.
356
357
358       -normal-window
359
360
361       Make  rofi  react  like a normal application window. Useful for scripts
362       like Clerk that are basically an application.
363
364
365       -[no-]steal-focus
366
367
368       Make rofi steal focus on launch and restore close to window  that  held
369       it when launched.
370
371
372   Matching
373       -matching method
374
375
376       Specify  the matching algorithm used.  Currently, the following methods
377       are supported:
378
379
380normal: match the int string
381
382regex: match a regex input
383
384glob: match a glob pattern
385
386fuzzy: do a fuzzy match
387
388prefix: match prefix
389
390
391
392       Default: normal
393
394
395       Note: glob matching might be slow for larger lists
396
397
398       -tokenize
399
400
401       Tokenize the input.
402
403
404       -drun-categories category1,category2
405
406
407       Only show desktop files that are present in the listed categories.
408
409
410       -drun-match-fields field1,field2,...
411
412
413       When using drun, match only with the specified  Desktop  entry  fields.
414       The different fields are:
415
416
417name: the application's name
418
419generic: the application's generic name
420
421exec: the application's  executable
422
423categories: the application's categories
424
425comment: the application comment
426
427
428
429
430              all: all the above
431
432              Default: name,generic,exec,categories,keywords
433
434
435
436       -drun-display-format
437
438
439       The format string for the drun dialog:
440
441
442name: the application's name
443
444generic: the application's generic name
445
446exec: the application's  executable
447
448categories: the application's categories
449
450comment: the application comment
451
452
453
454       Pango markup can be used to formatting the output.
455
456
457              Default: {name} [<span weight='light' size='small'><i>({generic})</i></span>]
458
459
460
461       Note: Only fields enabled in -drun-match-fields can be used in the for‐
462       mat string.
463
464
465       -[no-]drun-show-actions
466
467
468       Show actions present in the Desktop files.
469
470
471              Default: false
472
473
474
475       -window-match-fields field1,field2,...
476
477
478       When using window mode, match only with the specified fields.  The dif‐
479       ferent fields are:
480
481
482title: window's title
483
484class: window's class
485
486role: window's role
487
488name: window's name
489
490desktop: window's current desktop
491
492
493
494
495              all: all the above
496
497              Default: all
498
499
500
501       -matching-negate-char char
502
503
504       Set  the  character used to negate the query (i.e. if it does not match
505       the next keyword).  Set to '\x0' to disable.
506
507
508              Default: '-'
509
510
511
512   Layout and Theming
513       IMPORTANT:
514         In newer rofi releases, all the theming options have been moved  into
515       the new theme format. They are no longer normal
516         rofi  options  that can be passed directly on the command line (there
517       are too many).
518         Small snippets can be passed on the  command  line:  rofi  -theme-str
519       'window {width: 50%;}' to override a single
520         setting. They are merged into the current theme.
521         They can also be appended at the end of the rofi config file to over‐
522       ride parts of the theme.
523
524
525       Most of the following options are deprecated and should  not  be  used.
526       Please  use  the  new  theme format to customize rofi. More information
527       about the new format can be found in the rofi-theme(5) manpage.
528
529
530       -location
531
532
533       Specify where the window should be located. The numbers map to the fol‐
534       lowing locations on screen:
535
536
537                1 2 3
538                8 0 4
539                7 6 5
540
541
542
543       Default: 0
544
545
546       -fixed-num-lines
547
548
549       Keep a fixed number of visible lines (See the -lines option.)
550
551
552       -sidebar-mode
553
554
555       Open  in  sidebar-mode.  In  this  mode, a list of all enabled modes is
556       shown at the bottom.  (See -modi option) To show sidebar, use:
557
558
559              rofi -show run -sidebar-mode -lines 0
560
561
562
563       -hover-select
564
565
566       Automatically select the entry the mouse is hovering over. This  option
567       is  best  combined with custom mouse bindings.  To utilize hover-select
568       and accept an entry in a single click, use:
569
570
571              rofi -show run -hover-select -me-select-entry '' -me-accept-entry MousePrimary
572
573
574
575       -eh number
576
577
578       Set row height (in chars) Default: 1
579
580
581       -auto-select
582
583
584       When one entry is left, automatically select it.
585
586
587       -m num
588
589
590       -m name
591
592
593       -monitor num
594
595
596       -monitor name
597
598
599       Select monitor to display rofi on.  It accepts as  input:  primary  (if
600       primary  output  is set), the xrandr output name, or integer number (in
601       order of detection). Negative numbers are handled differently:
602
603
604-1: the currently focused monitor.
605
606-2: the currently focused window (that is, rofi will  be  dis‐
607                played on top of the focused window).
608
609-3:  Position  of mouse (overrides the location setting to get
610                normal context menu behavior.)
611
612-4: the monitor with the focused window.
613
614
615
616
617              -5: the monitor that shows the mouse pointer.
618
619              Default: -5
620
621
622
623       See rofi -h output for the detected monitors, their position, and size.
624
625
626       -theme filename
627
628
629       Path to the new theme file format. This overrides the  old  theme  set‐
630       tings.
631
632
633       -theme-str string
634
635
636       Allow theme parts to be specified on the command line as an override.
637
638
639       For example:
640
641
642              rofi -theme-str '#window { fullscreen: true; }'
643
644
645
646       This option can be specified multiple times.  This is now the method to
647       tweak the theme via the command line.
648
649
650       -dpi  number
651
652
653       Override the default DPI setting.
654
655
656              • If set to 0, it tries to auto-detect based on X11 screen  size
657                (similar to i3 and GTK).
658
659              • If  set to 1, it tries to auto-detect based on the size of the
660                monitor that rofi is displayed on (similar to latest Qt 5).
661
662
663
664       -selected-row selected row
665
666
667       Select a certain row.
668
669
670       Default: 0
671
672
673   PATTERN setting
674       -terminal
675
676
677       Specify which terminal to start.
678
679
680              rofi -terminal xterm
681
682
683
684       Pattern: {terminal}
685
686
687       Default: x-terminal-emulator
688
689
690       -ssh-client client
691
692
693       Override the used ssh client.
694
695
696       Pattern: {ssh-client}
697
698
699       Default: ssh
700
701
702   SSH settings
703       -ssh-command cmd
704
705
706       Set the command to execute when starting an ssh session.   The  pattern
707       {host} is replaced by the selected ssh entry.
708
709
710       Pattern: {ssh-client}
711
712
713       Default: {terminal} -e {ssh-client} {host}
714
715
716       -parse-hosts
717
718
719       Parse the /etc/hosts file for entries.
720
721
722       Default: disabled
723
724
725       -parse-known-hosts -no-parse-known-hosts
726
727
728       Parse the  /.ssh/known_hosts file for entries.
729
730
731       Default: enabled
732
733
734   Run settings
735       -run-command cmd
736
737
738       Set  command  ({cmd}) to execute when running an application.  See PAT‐
739       TERN.
740
741
742       Default: {cmd}
743
744
745       -run-shell-command cmd
746
747
748       Set command to execute when running an application  in  a  shell.   See
749       PATTERN.
750
751
752       Default: {terminal} -e {cmd}
753
754
755       -run-list-command cmd
756
757
758       If set, use an external tool to generate a list of executable commands.
759       Uses run-command.
760
761
762       Default: {cmd}
763
764
765   Window switcher settings
766       -window-format format
767
768
769       Format what is being displayed for windows.
770
771
772       format: {field[:len]}
773
774
775       field:
776
777
778w: desktop name
779
780t: title of window
781
782n: name
783
784r: role
785
786c: class
787
788
789
790       len: maximum field length (0 for auto-size). If length and window width
791       are negative, field length is width - len.
792       If  length  is  positive, the entry will be truncated or padded to fill
793       that length.
794
795
796       default: {w}  {c}   {t}
797
798
799       -window-command cmd
800
801
802       Set command to execute on selected window for an  alt  action  (-kb-ac‐
803       cept-alt).  See PATTERN.
804
805
806       Default: "wmctrl -i -R {window}"
807
808
809       -window-thumbnail
810
811
812       Show window thumbnail (if available) as icon in the window switcher.
813
814
815       You can stop rofi from exiting when closing a window (allowing multiple
816       to be closed in a row).
817
818
819              configuration {
820                window {
821                    close-on-delete: false;
822                }
823              }
824
825
826
827   Combi settings
828       -combi-modi mode1,mode2
829
830
831       The modi to combine in combi mode.   For  syntax  to  -combi-modi,  see
832       -modi.  To get one merge view, of window,run, and ssh:
833
834
835              rofi -show combi -combi-modi "window,run,ssh" -modi combi
836
837
838
839       NOTE:  The i3 window manager dislikes commas in the command when speci‐
840       fying an exec command.  For that case, # can be used as a separator.
841
842
843   History and Sorting
844       -disable-history -no-disable-history (re-enable history)
845
846
847       Disable history
848
849
850       -sort to enable -no-sort to disable
851
852
853       Enable, disable sorting.  This setting can be changed at  runtime  (see
854       -kb-toggle-sort).
855
856
857       -sorting-method 'method' to specify the sorting method.
858
859
860       There are 2 sorting methods:
861
862
863              • levenshtein (Default)
864
865              • fzf sorting.
866
867
868
869       -max-history-size number
870
871
872       Maximum  number  of entries to store in history. Defaults to 25. (WARN‐
873       ING: can cause slowdowns when set too high)
874
875
876   Dmenu specific
877       -sep separator
878
879
880       Separator for dmenu. Example: To show a list of 'a' to 'e' with '|'  as
881       a separator:
882
883
884              echo "a|b|c|d|e" | rofi -sep '|' -dmenu
885
886
887
888       -p prompt
889
890
891       Specify the prompt to show in dmenu mode. For example, select 'monkey',
892       a,b,c,d, or e.
893
894
895              echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
896
897
898
899       Default: dmenu
900
901
902       -l number of lines to show
903
904
905       Maximum number of lines the menu may show before scrolling.
906
907
908              rofi -lines 25
909
910
911
912       Default: 15
913
914
915       -i
916
917
918       Makes dmenu searches case-insensitive
919
920
921       -a X
922
923
924       Active row, mark X as active. Where X  is  a  comma-separated  list  of
925       python(1)-style indices and ranges, e.g.  indices start at 0, -1 refers
926       to the last  row  with  -2  preceding  it,  ranges  are  left-open  and
927       right-close, and so on. You can specify:
928
929
930              • A single row: '5'
931
932              • A range of (last 3) rows: '-3:'
933
934              • 4  rows  starting  from  row 7: '7:11' (or in legacy notation:
935                '7-10')
936
937              • A set of rows: '2,0,-9'
938
939              • Or any combination: '5,-3:,7:11,2,0,-9'
940
941
942
943       -u X
944
945
946       Urgent row, mark X as urgent. See -a option for details.
947
948
949       -only-match
950
951
952       Only return a selected item, do not allow custom entry.  This mode  al‐
953       ways  returns  an entry. It will not return if no matching entry is se‐
954       lected.
955
956
957       -no-custom
958
959
960       Only return a selected item, do not allow custom entry.  This mode  re‐
961       turns directly when no entries given.
962
963
964       -format format
965
966
967       Allows  the  output of dmenu to be customized (N is the total number of
968       input entries):
969
970
971              • 's' selected string
972
973              • 'i' index (0 - (N-1))
974
975              • 'd' index (1 - N)
976
977              • 'q' quote string
978
979              • 'p' Selected string stripped from Pango markup (Needs to be  a
980                valid string)
981
982              • 'f' filter string (user input)
983
984              • 'F' quoted filter string (user input)
985
986
987
988       Default: 's'
989
990
991       -select string
992
993
994       Select first line that matches the given string
995
996
997       -mesg string
998
999
1000       Add  a  message line below the filter entry box. Supports Pango markup.
1001       For more information on  supported  markup,  see  here  ⟨https://devel
1002       oper.gnome.org/pygtk/stable/pango-markup-language.html⟩
1003
1004
1005       -dump
1006
1007
1008       Dump the filtered list to stdout and quit.  This can be used to get the
1009       list as rofi would filter it.  Use together with -filter command.
1010
1011
1012       -input file
1013
1014
1015       Reads from file instead of stdin.
1016
1017
1018       -password
1019
1020
1021       Hide the input text. This should not be considered secure!
1022
1023
1024       -markup-rows
1025
1026
1027       Tell rofi that DMenu input is Pango markup encoded, and should be  ren‐
1028       dered.    See   here   ⟨https://developer.gnome.org/pygtk/stable/pango-
1029       markup-language.html⟩ for details about Pango markup.
1030
1031
1032       -multi-select
1033
1034
1035       Allow multiple lines to be selected. Adds a small  selection  indicator
1036       to the left of each entry.
1037
1038
1039       -sync
1040
1041
1042       Force  rofi  mode  to first read all data from stdin before showing the
1043       selection window. This is original dmenu behavior.
1044
1045
1046       Note: the default asynchronous mode will also be automatically disabled
1047       if  used  with  conflicting  options,  such  as  -dump,  -only-match or
1048       -auto-select.
1049
1050
1051       -async-pre-read number
1052
1053
1054       Reads the first number entries blocking, then switches to  async  mode.
1055       This makes it feel more 'snappy'.
1056
1057
1058       default: 25
1059
1060
1061       -window-title title
1062
1063
1064       Set name used for the window title. Will be shown as Rofi - title
1065
1066
1067       -w windowid
1068
1069
1070       Position rofi over the window with the given X11 window ID.
1071
1072
1073       -keep-right
1074
1075
1076       Set ellipsize mode to start. So, the end of the string is visible.
1077
1078
1079   Message dialog
1080       -e message
1081
1082
1083       Pops up a message dialog (used internally for showing errors) with mes‐
1084       sage.  Message can be multi-line.
1085
1086
1087   File browser settings
1088       File browser behavior can be controlled via the following options:
1089
1090
1091              configuration {
1092                 filebrowser {
1093                    /** Directory the file browser starts in. */
1094                    directory: "/some/directory";
1095                    /**
1096                      * Sorting method. Can be set to:
1097                      *   - "name"
1098                      *   - "mtime" (modification time)
1099                      *   - "atime" (access time)
1100                      *   - "ctime" (change time)
1101                      */
1102                    sorting-method: "name";
1103                    /** Group directories before files. */
1104                    directories-first: true;
1105                 }
1106              }
1107
1108
1109
1110   Other
1111       -drun-use-desktop-cache
1112
1113
1114       Build and use a cache with the content of  desktop  files.  Usable  for
1115       systems with slow hard drives.
1116
1117
1118       -drun-reload-desktop-cache
1119
1120
1121       If  drun-use-desktop-cache is enabled, rebuild a cache with the content
1122       of desktop files.
1123
1124
1125       -drun-url-launcher command
1126
1127
1128       Command to open a Desktop Entry that is a Link.
1129
1130
1131       -pid path
1132
1133
1134       Make rofi create a pid file and check this on  startup.  The  pid  file
1135       prevents  multiple  rofi instances from running simultaneously. This is
1136       useful when running rofi from a key-binding daemon.
1137
1138
1139       -display-{mode} string
1140
1141
1142       Set the  name  to  use  for  mode.  This  is  used  as  prompt  and  in
1143       combi-browser.
1144
1145
1146       It is now preferred to use the configuration file:
1147
1148
1149              configuration {
1150                {mode} {
1151                  display-name: *string*;
1152                }
1153              }
1154
1155
1156
1157       -click-to-exit -no-click-to-exit
1158
1159
1160       Click the mouse outside the rofi window to exit.
1161
1162
1163       Default: enabled
1164
1165

PATTERN

1167       To launch commands (for example, when using the ssh launcher), the user
1168       can enter the used command-line. The following keys can  be  used  that
1169       will be replaced at runtime:
1170
1171
1172{host}: the host to connect to
1173
1174{terminal}: the configured terminal (see -terminal-emulator)
1175
1176{ssh-client}: the configured ssh client (see -ssh-client)
1177
1178{cmd}: the command to execute
1179
1180{window}: the window ID of the selected window (in window-com‐
1181                mand)
1182
1183
1184

DMENU REPLACEMENT

1186       If argv[0] (calling command) is dmenu, rofi will start in  dmenu  mode.
1187       This  way, it can be used as a drop-in replacement for dmenu. Just copy
1188       or symlink rofi to dmenu in $PATH.
1189
1190
1191              ln -s /usr/bin/rofi /usr/bin/dmenu
1192
1193
1194

THEMING

1196       Please see rofi-theme(5) manpage for more information on theming.
1197
1198

KEY BINDINGS

1200       rofi has the following key bindings:
1201
1202
1203Control-v, Insert: Paste from clipboard
1204
1205Control-Shift-v, Shift-Insert: Paste primary selection
1206
1207Control-u: Clear the line
1208
1209Control-a: Beginning of line
1210
1211Control-e: End of line
1212
1213Control-f, Right: Forward one character
1214
1215Alt-f, Control-Right: Forward one word
1216
1217Control-b, Left: Back one character
1218
1219Alt-b, Control-Left: Back one word
1220
1221Control-d, Delete: Delete character
1222
1223Control-Alt-d: Delete word
1224
1225Control-h, Backspace, Shift-Backspace: Backspace (delete  pre‐
1226                vious character)
1227
1228Control-Alt-h: Delete previous word
1229
1230Control-j,Control-m,Enter: Accept entry
1231
1232Control-n,Down: Select next entry
1233
1234Control-p,Up: Select previous entry
1235
1236Page Up: Go to previous page
1237
1238Page Down: Go to next page
1239
1240Control-Page Up: Go to previous column
1241
1242Control-Page Down: Go to next column
1243
1244Control-Enter: Use entered text as a command (in ssh/run modi)
1245
1246Shift-Enter:  Launch  the  application  in  a terminal (in run
1247                mode)
1248
1249Control-Shift-Enter: As Control-Enter and run the  command  in
1250                terminal (in run mode)
1251
1252Shift-Enter:  Return  the  selected entry and move to the next
1253                item while keeping rofi open. (in dmenu)
1254
1255Shift-Right: Switch to the next mode. The list can be  custom‐
1256                ized with the -modi argument.
1257
1258Shift-Left:  Switch to the previous mode. The list can be cus‐
1259                tomized with the -modi argument.
1260
1261Control-Tab: Switch to the next mode. The list can be  custom‐
1262                ized with the -modi argument.
1263
1264Control-Shift-Tab:  Switch  to the previous mode. The list can
1265                be customized with the -modi argument.
1266
1267Control-space: Set selected item as input text.
1268
1269Shift-Del: Delete entry from history.
1270
1271grave: Toggle case sensitivity.
1272
1273Alt-grave: Toggle sorting.
1274
1275Alt-Shift-S: Take a screenshot and store it  in  the  Pictures
1276                directory.
1277
1278Control-l: File complete for run dialog.
1279
1280
1281
1282       This list might not be complete, to get a full list of all key bindings
1283       supported in your rofi, see rofi -h. The options starting with -kb  are
1284       keybindings.
1285
1286
1287       Key  bindings can be modified using the configuration systems. Multiple
1288       keys can be bound to one action by comma separating them.  For  example
1289       -kb-primary-paste "Conctrol+v,Insert"
1290
1291
1292       To get a searchable list of key bindings, run rofi -show keys.
1293
1294
1295       A  key  binding  starting  with  ! will act when all keys have been re‐
1296       leased.
1297
1298

Available Modi

1300   window
1301       Show a list of all  the  windows  and  allow  switching  between  them.
1302       Pressing the delete-entry binding (shift-delete) will close the window.
1303       Pressing the accept-custom binding (control-enter or shift-enter)  will
1304       run a command on the window.  (See option window-command );
1305
1306
1307       If there is no match, it will try to launch the input.
1308
1309
1310   windowcd
1311       Shows a list of the windows on the current desktop and allows switching
1312       between them.  Pressing the delete-entry  binding  (shift-delete)  will
1313       kill  the window.  Pressing the accept-custom binding (control-enter or
1314       shift-enter) will run a command on the window.  (See option window-com‐
1315       mand );
1316
1317
1318       If there is no match, it will try to launch the input.
1319
1320
1321   run
1322       Shows a list of executables in $PATH and can launch them (optional in a
1323       terminal).  Pressing the delete-entry binding (shift-delete)  will  re‐
1324       move this entry from the run history.  Pressing the accept-custom bind‐
1325       ing (control-enter) will run the command as entered in the  entry  box.
1326       Pressing the accept-alt binding (shift-enter) will run the command in a
1327       terminal.
1328
1329
1330       When pressing the mode-complete binding (Control-l), you  can  use  the
1331       File  Browser  mode  to launch the application with a file as the first
1332       argument.
1333
1334
1335   drun
1336       Same as the run launches, but the list is created  from  the  installed
1337       desktop  files.  It automatically launches them in a terminal if speci‐
1338       fied  in  the  Desktop  File.   Pressing   the   delete-entry   binding
1339       (shift-delete)  will  remove this entry from the run history.  Pressing
1340       the accept-custom binding (control-enter) will run the command  as  en‐
1341       tered  in the entry box.  Pressing the accept-alt binding (shift-enter)
1342       will run the command in a terminal.
1343
1344
1345       When pressing the mode-complete binding (Control-l), you  can  use  the
1346       File  Browser mode to launch the application passing a file as argument
1347       if specified in the desktop file.
1348
1349
1350       The DRUN mode tries to  follow  the  XDG  Desktop  Entry  Specification
1351https://freedesktop.org/wiki/Specifications/desktop-entry-spec/⟩   and
1352       should be compatible with applications using this standard.   Some  ap‐
1353       plications  create  invalid  desktop files, rofi will discard these en‐
1354       tries.  See the debugging section for more info on DRUN mode, this will
1355       print why desktop files are discarded.
1356
1357
1358       There are two advanced options to tweak the behaviour:
1359
1360
1361              configuration {
1362                 drun {
1363                    /** Parse user desktop files. */
1364                    parse-user:   true;
1365                    /** Parse system desktop files. */
1366                    parse-system: false;
1367                 }
1368              }
1369
1370
1371
1372   ssh
1373       Shows  a  list of SSH targets based on your ssh config file, and allows
1374       to quickly ssh into them.
1375
1376
1377   keys
1378       Shows a searchable list of key bindings.
1379
1380
1381   script
1382       Allows custom scripted Modi to be added, see the rofi-script(5) manpage
1383       for more information.
1384
1385
1386   combi
1387       Combines  multiple  modi  in  one list. Specify which modi are included
1388       with the -combi-modi option.
1389
1390
1391       When using the combi mode, a !bang can be used to filter the results by
1392       modi.   All modi that match the bang as a prefix are included.  For ex‐
1393       ample, say you have specified -combi-modi run,window,windowcd. If  your
1394       query  begins  with  the bang !w, only results from the window and win‐
1395       dowcd modi are shown, even if the rest of the input  text  would  match
1396       results from run.
1397
1398
1399       If no match, the input is handled by the first combined modi.
1400
1401

FAQ

1403   The text in the window switcher is not nicely aligned.
1404       Try using a mono-space font.
1405
1406
1407   The window is completely black.
1408       Check  quotes  used  on the command-line: you might have used ("smart
1409       quotes") instead of " ("machine quotes").
1410
1411
1412   What does the icon in the top right show?
1413       The indicator shows:
1414
1415
1416              ` ` Case insensitive and no sorting.
1417              `-` Case sensitivity enabled, no sorting.
1418              `+` Case insensitive and Sorting enabled
1419              `±` Sorting and Case sensitivity enabled"
1420
1421
1422

EXAMPLES

1424       Some basic usage examples of rofi:
1425
1426
1427       Show the run dialog:
1428
1429
1430              rofi -modi run -show run
1431
1432
1433
1434       Show the run dialog, and allow switching to  Desktop  File  run  dialog
1435       (drun):
1436
1437
1438              rofi -modi run,drun -show run
1439
1440
1441
1442       Combine the run and Desktop File run dialog (drun):
1443
1444
1445              rofi -modi combi -show combi -combi-modi run,drun
1446
1447
1448
1449       Combine the run and Desktop File run dialog (drun), and allow switching
1450       to window switcher:
1451
1452
1453              rofi -modi combi,window -show combi -combi-modi run,drun
1454
1455
1456
1457       Pop up a text message claiming that this is the end:
1458
1459
1460              rofi -e "This is the end"
1461
1462
1463
1464       Pop up a text message in red, bold font claiming that this is still the
1465       end:
1466
1467
1468              rofi -e "<span color='red'><b>This is still the end</b></span>" -markup
1469
1470
1471
1472       Show all key bindings:
1473
1474
1475              rofi -show keys
1476
1477
1478
1479       Use qalc to get a simple calculator in rofi:
1480
1481
1482               rofi -show calc -modi "calc:qalc +u8 -nocurrencies"
1483
1484
1485

i3

1487       In  i3  ⟨http://i3wm.org/⟩  you want to bind rofi to be launched on key
1488       release. Otherwise, it cannot grab the keyboard.  See also the i3  man‐
1489       ual ⟨http://i3wm.org/docs/userguide.html⟩:
1490
1491
1492       Some  tools  (such  as import or xdotool) might be unable to run upon a
1493       KeyPress event, because the  keyboard/pointer  is  still  grabbed.  For
1494       these  situations,  the  --release flag can be used, as it will execute
1495       the command after the keys have been released.
1496
1497

LICENSE

1499              MIT/X11
1500
1501              Permission is hereby granted, free of charge, to any person obtaining
1502              a copy of this software and associated documentation files (the
1503              "Software"), to deal in the Software without restriction, including
1504              without limitation the rights to use, copy, modify, merge, publish,
1505              distribute, sublicense, and/or sell copies of the Software, and to
1506              permit persons to whom the Software is furnished to do so, subject to
1507              the following conditions:
1508
1509              The above copyright notice and this permission notice shall be
1510              included in all copies or substantial portions of the Software.
1511
1512              THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1513              OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1514              MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1515              IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1516              CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1517              TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1518              SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1519
1520
1521

WEBSITE

1523       rofi website can be found here ⟨https://davedavenport.github.io/rofi/
1524
1525

SUPPORT

1527       rofi support can be obtained:
1528        * GitHub Discussions ⟨https://github.com/davatorium/rofi/discussions
1529        * Forum (Reddit) ⟨https://reddit.com/r/qtools//
1530        * IRC ⟨irc://irc.libera.chat:6697/#rofi⟩ (#rofi on irc.libera.chat),
1531
1532

DEBUGGING

1534       To debug, it is smart to first try disabling your custom configuration:
1535       -no-config
1536
1537
1538       Disable parsing of configuration. This runs rofi in stock mode.
1539
1540
1541       If you run custom C plugins, you can disable them using:
1542
1543
1544       -no-plugins
1545
1546
1547       Disables the loading of plugins.
1548
1549
1550       To  further  debug the plugin, you can get a trace with (lots of) debug
1551       information.  This debug output can be enabled for  multiple  parts  in
1552       rofi  using  the  glib debug framework. Debug domains can be enabled by
1553       setting the G_MESSAGES_DEBUG environment variable. At the time of  cre‐
1554       ation of this page, the following debug domains exist:
1555
1556
1557              • all: Show debug information from all domains.
1558
1559              • X11Helper: The X11 Helper functions.
1560
1561              • View: The main window view functions.
1562
1563              • Widgets.Box: The Box widget.
1564
1565              • Dialogs.DMenu: The dmenu mode.
1566
1567              • Dialogs.Run: The run mode.
1568
1569              • Dialogs.DRun: The desktop file run mode.
1570
1571              • Dialogs.Window: The window mode.
1572
1573              • Dialogs.Script: The script mode.
1574
1575              • Dialogs.Combi: The script mode.
1576
1577              • Dialogs.Ssh: The ssh mode.
1578
1579              • Rofi: The main application.
1580
1581              • Timings: Get timing output.
1582
1583              • Theme: Theme engine debug output. (warning lots of output).
1584
1585              • Widgets.Icon: The Icon widget.
1586
1587              • Widgets.Box: The box widget.
1588
1589              • Widgets.Container: The container widget.
1590
1591              • Widgets.Window: The window widget.
1592
1593              • Helpers.IconFetcher: Information about icon lookup.
1594
1595
1596
1597       The  output  of this can provide useful information when writing an is‐
1598       sue.
1599
1600
1601       More information (possibly outdated) see this ⟨https://github.com/Dave
1602       Davenport/rofi/wiki/Debugging%20Rofi⟩ wiki entry.
1603
1604

ISSUE TRACKER

1606       The rofi issue tracker can be found here ⟨https://github.com/DaveDaven
1607       port/rofi/issues⟩
1608
1609
1610       When creating an issue, please read this ⟨https://github.com/DaveDaven
1611       port/rofi/blob/master/.github/CONTRIBUTING.md⟩ first.
1612
1613

SEE ALSO

1615       rofi-sensible-terminal(1),   dmenu(1),  rofi-theme(5),  rofi-script(5),
1616       rofi-theme-selector(1)
1617
1618

AUTHOR

1620              • Qball Cow ⟨qball@blame.services⟩
1621
1622              • Rasmus Steinke ⟨rasi@xssn.at⟩
1623
1624              • Quentin Glidic ⟨sardemff7+rofi@sardemff7.net⟩
1625
1626
1627
1628       Original code based on work by: Sean Pringle  ⟨https://github.com/sean
1629       pringle/simpleswitcher⟩ ⟨sean.pringle@gmail.com⟩
1630
1631
1632       For a full list of authors, check the AUTHORS file.
1633
1634
1635
1636                                     rofi                              ROFI(1)
Impressum