Rofi Versions Save

Rofi: A window switcher, application launcher and dmenu replacement

1.5.2

5 years ago

Rofi 1.5.2 is another bug-fix release in the 1.5 series.

Fix border drawing

Issue: #792, #783

There turned out to be a bug in how borders are drawn. It would overlap parts of the border on corners, screwing up transparency.

broken border

This is now fixed.

Improve Icon handling

Issue: #860

Several bugs around Icon handling have been fixed:

  • Failing to load multiple (identical icons) on initial load.
  • Preload user-set icon theme.
  • Use the common threadpool in rofi for the icon fetching, instead of spawning a custom one.

New sort syntax

Because of all the changes to the sorting methods in rofi, the command-line options for it where very confusing. To fix this they have been changed.

The sort option is now used to enable/disable sorting. (This can also be changed at run-time using the hotkey)

The sorting-method allows you to set the sorting method. Currently it supports normal (levenshtein) and fzf.

Documentation updates

Issue: #879, #867, #837, #831, #804

Thanks to all the people highlighting or providing fixes to the documentation.

Improving the ssh known hosts file parser

Issue: #820

The original known hosts parser was very limited. The parser has been extended to a bit more robust.

Additions

For some reason I can never make a release without adding more features to it. (Feature creep?).

Option to change the negate character

Issue: #877

The option to negate a query: foo -bar e.g. search for all items matching foo but not bar caused a lot of confusion. It seems people often use rofi to also add arguments to applications (that start with a -).

To help with this, the negate character (-) can be changed, or disabled.

To disable:

rofi -matching-negate-char '\0'

Modify the DRUN display string

Issue: #858

An often requested feature is the ability to change the display string for the drun modi. The -drun-display-format option is added that allows just this.

-drun-display-format

The format string for the drun dialog:

  • name: the application's name
  • generic: the application's generic name
  • exec: the application's executable
  • categories: the application's categories
  • comment: the application comment

Default: {name} [({generic})]

Items between [] are only displayed when the field within is set. So in the above example, the () are omitted when {generic} is not set.

Theme format now supports environment variables

You can use environment variables as part of your theme/configuration file property value. Environment variables start with $ and the name is surrounded by {}. So to query the environment FOO you can do:

#window {
    background: ${FOO};
}

The environment is then parsed as a normal value.

1.5.1

6 years ago

Bug-fix release:

Changelog: - Egor Zvorykin: Fix typos in theme manpage. (#760) - Ben: Fix README config file location. (#761) - [SSH] Reload when ssh entry is deleted. - Add support for randr 1.5 monitors. (#749) - Diki Anata: Fix border layout structure. - Remove duplicate tests. (#543) - Fix make test in libnkutils.

1.5.0

6 years ago

After the last release turned out to be fairly large we are hopefully back to more regular, smaller releases. This release focuses on squashing some bugs and hopefully improving the user experience. Nevertheless this release also includes some new features.

Big thanks to SardemFF7, without whose help and contributions this release would not have been possible.

New features

Specify matching field

What field rofi should match on the drun view has been a source of long discussions, which resulted in new options to specify, which fields rofi should match against in either drun or window mode.

-drun-match-fields field1,field2,...

When using drun, match only with the specified Desktop entry fields. The different fields are:

  • name: the application's name

  • generic: the application's generic name

  • exec: the application's executable

  • categories: the application's categories

  • comment: the application comment

  • all: all of the above

    Default: name,generic,exec,categories

-window-match-fields field1,field2,...

When using window mode, match only with the specified fields. The different fields are:

  • title: window's title
  • class: window's class
  • role: window's role
  • name: window's name
  • desktop: window's current desktop
  • all: all of the above

Default: all

Pass extra properties in script mode

To further improve script mode, support for passing properties has been added. You can now set the prompt, a message or use markup and active/urgent colors from the script itself.

E.g. to set the prompt from a bash mode script:

echo -en "\x00prompt\x1ftesting\n"

Or to mark the first 4 rows urgent and add a message:

echo -en "\x00urgent\x1f0-3\n"
echo -en "\0message\x1fSpecial <b>bold</b> message\n"

The urgent and active syntax is identical to the dmenu command-line argument.

Negated matching

The matching engine has been extended. It’s now possible to negate parts of the query. Searching for deconz -sh will list all fields that match deconz but do not contain sh.

match

match negated

Hashtag rofi?

In themes the '#' prefix before the element name is now optional. As well as not being needed, it made the multi-selector look weird.

Example:

entry,prompt {
    background-color: DarkRed;
    text-color:       White;
}

Backward incompatible changes

Mouse bindings

Mouse button and scroll bindings are now separated and naming has changed.

For the 3 base buttons:

  • Mouse1 is now MousePrimary
  • Mouse2 is now MouseMiddle
  • Mouse3 is now MouseSecondary

For the scroll wheel:

  • Mouse4 is now ScrollUp
  • Mouse5 is now ScrollDown
  • Mouse6 is now ScrollLeft
  • Mouse7 is now ScrollRight

For extra buttons:

  • Mouse8 is now MouseBack
  • Mouse9 is now MouseForward
  • Above 10, you have to use the platform-specific MouseExtra<number> (replace <number>).

Bug fixes

Prompt colon

This is a controversial one, abeing the cause of heated discussions in the past. The prompt string of rofi is now left unmodified. Themes, like the default theme, can re-add the colon if desired.

inputbar {
    children:   [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
textbox-prompt-colon {
    expand:     false;
    str:        ":";
    margin:     0px 0.3em 0em 0em ;
}

Results in:

rofi colon

History size

By frequent request, you can now tweak the size of the history each modi keeps. While not recommended to change it as it can cause performance issues, this allows power users to tweak it to their liking.

rofi.max-history-size: 500

Full Changelog

  • [Theme] Accept integer notation for double properties. (#752)
  • [View] Theme textboxes are vertically sized and horizontal wrapped. (#754)
  • Rofi 1.4.2 doesn't capture ←, ↑, →, ↓ binding to keys to work in combination with Mode_switch (#744)
  • Add konsole to list of sensible terminals. (#739)
  • Allow drun to filter based on comment field. (#733)
  • Add prompt widget to default theme.
  • Add manpage for rofi-theme-selector.
  • Dump theme without # prefix and separator .
  • Fix issue with xnomad and -4 placing. (#683)
  • DRun obey OnlyShowIn and NotShowIn properties.
  • Store default theme in rofi binary using GResources.
  • Add extra margin between prompt and entry.
  • Remove colon from prompt. (#637)
  • Add support for passing extra properties in script mode.
  • Better error message on invalid argb syntax.
  • Fix default theme border.
  • Make '#' in the parser optional.
  • Update themes.
  • Add -drun/window-match-fields option (thx to Askrenteam) for drun/window menu. (#690/#656)
  • Implement negated match. (#665)
  • Fix parsing of non-existing fields. (#700)
  • rofi-theme-selector fixes.
  • Fix spelling error (thx to jmkjaer)
  • Fix test on i686/arm. (#692)
  • Fix error in theme manpage. (#686)
  • Allow history size to be specified. (#613)
  • Fix drun history implementation. (#579)
  • Add gentoo install instruction. (#685)

1.4.2

6 years ago
  • Add sort to manpage. (#682)
  • Add tranaparent to theme manpage. (#688)
  • Re-add theme headers. (#679)
  • Fix super key. (#684)
  • Unknown option libnkutils:uuid. (#677)
  • Mode window is not found. (#686)
  • Fix meson build in dist file.

1.4.1

6 years ago
  • Fixed version number meson.

1.4.0

6 years ago

This release contains some major changes. One of them being a new theme engine. The migration from older versions to this version might not go flawless.

With more then 750 commits since the last version, this is one of the biggest releases so far. In this version we used the groundwork laid in v1.3.0 and went completely nuts with it. Hopefully this release should satisfy the die-hard desktop ricers with a brand new theme engine. Lot of different colors, border, multiple fonts everything is now possible.

Because of The great work done by SardemFF7 the code base is simplified and the key and mouse handling improved. The libraries provided by SardemFF7 also made it possible to add a often requested feature of icons (correctly using the icon-theme). A feature I never expected to be added. To top this off, SardemFF7 added support to build rofi using meson.

A last big addition and still in beta, is support for plugins. Allowing the addition of some weird/fancy features. Currently two plugins are available, blezz a quick launch menu with it own menu definition and top displaying running processes.

Beside these major changes, this release includes a lot of bug-fixes and small improvements. See the bottom of this release notes for a more complete list of changes.

Theme engine

The biggest new feature of this release is the theme engine. Building on the changes made in v1.3.0 we implemented a new theme engine and it has a completely new theme format. While the themes are a lot more verbose now, it does allow for a lot of extra customizations.

It is now possible to theme each widget in rofi independently:

Colors

You can now set the color on each widget independent in most of the CSS supported color formats (hsl, cmyk, rgb, etc.) and each color can have a transparency. There are three colors that can be set on each widget:

  • background-color Used to draw the background of the widget. Each widget is drawn on top of it parent, if the background is transparent, you will see the parents widget.
  • border-color Used to draw the borders.
  • text-color Used to draw text. If not set the foreground color is used.

rainbox

Borders

On every widget we can now configure a border for each of the four sides, the color of the border, the style of the border (solid or dashed) and the radius of the corners can be set.

border1

This combined with (fake) transparency can make for a very nice looking, rounded rofi experience.

border2

Fonts

An often made request was support for different fonts for the entry box and the list. With the new theme, it is possible to change the font and size of all widgets.

fonts

Note that opening a fonts is one of the slowest operations during rofi startup; having multiple fonts could have a significant impact on startup times.

Flexible layout

To top all these changes, as an advanced feature the whole layout of the window can be changed. Making it possible to mimic the original dmenu view, or make it appear as a minimal context menu.

dmenu

Error reporting

The new theme parser will also be more verbose when encountering parsing errors, hopefully helping debugging and modifying themes.

For example when forgetting a trailing ';' will report where it failed, and what it expected (a ';').

rofi-error

Importing

The new theme parser also support importing and overriding. This allow you to make make modifications to an existing theme, without having to completely copy it. For example, I want to use the arthur theme (shipped with rofi) but use fake transparency, change the font off the result list and import a set of overriding colors from mycolors.

// Import the default arthur theme
@theme "arthur"

// Load in overriding of colors from mycolors.
@import "mycolors"

/* on the window widget, set transparency to use a screenshot of the screen. */
#window {
    transparency: "screenshot";
}
/* Override the font on the listview elements */
#element { 
    font: "Ubuntu Mono 18";
}                          

Icons

Another often made request, I never expected to be implemented, was icon support. With the help of SardemFF7 an implementation was possible that correctly follows the XDG icon specification and does not negatively impact the performance. Currently the drun and the window switcher can application icons. To enable icons, set the show-icons property to true.

icons

More flexible key and mouse bindings

Thanks to another great work of SardemFF7 you can now configure how the mouse behave and bind modifier keys. It also improves on error messages. For example it will now detect duplicate bindings.

For example to select an entry on single click, instead of double click:

rofi -show run -me-select-entry '' -me-accept-entry 'Mouse1'

Fuzzy Matching

With thanks to Fangrui Song, the fuzzy matcher will now use a ranking similar to fzf to sort the results. This should hopefully to improve the results, something a lot of users will appreciate.

Without:

rofi no fzf

With:

rofi fzf

Initial Plugin support

This feature is still in beta stage.

It is now possible to add custom mode via C plugins. This is allows interactive modi to be added to rofi. For example it is possible to have top (display linux processes) mode:

rofi top

This mode allows sorting of the result on different keys (cpu usage, memory, etc.) to be selected, programs to be killed and refreshes the results every 2 seconds.

See here.

Configuration File

This feature is in alpha stage.

The new theme format can now (as an alpha) feature be used to set rofi's configuration. In the future, when we add wayland support, we want to get rid of the current Xresources (X11) based configuration format. You can see how this would look using: rofi -dump-config.

Detailed Changelog

  • Improved error messages
    • Theme parsing.
    • Keybinding. Duplicate bindings will now be reported.
    • Invalid commandline options.
    • Etc.
  • Customizable highlight, allowing underline, strikethrough, italic, bold, small caps and the color to be set.
  • Give up when keyboard is not grabbed in first 5 seconds.
  • Improve manpage
    • rofi (1)
    • rofi-themes (5)
  • Super-{1..10} hotkeys for selecting the first 10 rows.
  • Allow x-align/y-align on textbox.
  • Support matching bangs on multiple characters in combi mode. (#542)
  • Set WM_CLASS (#549)
  • Async pre-read 25 rows for improving user experience. (#550)
  • Improve handling in floating window manager by always setting window size.
  • DRun speedups.
  • Make lazy-grab default.
  • Remove extra layer in textbox. (#553)
  • Ignore fonts that result in a family name or size 0. (#554)
  • [Combi] Allow bang to match multiple modes. (#552)
  • Add detection of window manager and work around quirks.
  • Support dynamic plugins.
  • DMENU tty detection.
  • Support for icons in drun, combi and window mode.
  • Startup notification of launched application support.
  • Meson support.
  • Fuzzy matching with fzf based sorting algorithm.
  • Auto-detect DPI.
  • Set cursor at the end of the input field. (#662)
  • Meson support (thx to SardemFF7).
  • [Script] parse the command as if it was commandline. (#650)
  • Don't enable asan by meson. (#642)
  • Allow text widgets to be added in theme and string to be set.
  • [Dmenu] Support the -w flag.
  • Allow window (via window id) to be location for rofi window.
  • [Dmenu] Allow multi-select mode in -no-custom mode.
  • Flex/Bison based parser for new theme format.
  • Meson build support.
  • Initial plugin support, exporting of pkg-config file for rofi.
  • Improved positioning support for placing window on monitor.
  • Allow rofi to be placed above window based on window id.
  • Support different font per textbox.
    • Keep cache of previous used fonts.

1.3.1

7 years ago

A quick follow up release to resolve some issues with copyright notices in the shipped rofi themes. Below is the, modest, full list of changes.

Detailed Changelog

New Features

  • [DRun] Search categories. (#449)

Improvements

  • Fix exit when failed to grab keyboard. (#524)
  • Introduce lazy keyboard grab mode for people who want rofi to show on key-down in i3.
  • Add copyrights to theme (needed for debian packaging).
  • DMENU: Correctly detect end-of-file (#518)
  • Directly queue redraw on overlay change.
  • Remove pango markup from workspace names in I3. (#507)

1.3.0

7 years ago

V1.3.0: Dan vs. Greg: The never ending story.

This release mostly focussed on cleaning up and refactoring the internals. One of the big changes is that the gui is no longer based on hard-coded positions. We introduced a widget system with boxes, scrollbars, separators, listview and textboxes. The boxes (vertical and horizontal) allows us to nice structure the layout and have them resize according to rules when the window changes size.

structure

This allowed us to make changes at run-time. In the future I hope we can use this to improve the theming (think css like themes). The cleanup and refactoring is not finished and will continue for the next release.

Beside this we still managed to get some new features in:

Dynamic window size

Enabled by the refactoring, rofi can now resize the window to fit the number of visible entries, so as you type and the list of options becomes small, so does the windows (this is disabled by default). Rofi will try to keep the text box at the same place so you don't have to move focus, this means that at the bottom of the screen the window layout is reversed so the textbox is at the bottom.

Resize action

Theme selector

To make it easier to get a good looking rofi, we included a theme-selector script and ship rofi with a set of themes. The script allows you to preview themes, and make them the default theme.

Theme Selector

It seems byzanz (to record the gif) changes the colors a bit. It looks better in real-life.

Fuzzy parser

On many request, the fuzzy matcher has been re-added:

fuzzy

ASync DMENU

Rofi can read input data for dmenu asynchronous from displaying. So if you have something that takes a time to produce, you can see the progress, start filtering and selecting entries before it finishes. This can be very useful when searching through large data sets. In the below screenshot it keeps feeding rofi the content of the directory. Rofi indicates it is still receiving data by the loading... text.

async

Async mode is not always possible, and will be disabled if not possible.

Drawing improvements

In this release rofi is more efficient in drawing its content to the X11 window. The basic redraw on expose has been speedup by a factor 1000. This was obtained by using a server side copy of the internal surface, instead of painting it with cairo each time. Especially for large (4k and higher) screens, in fullscreen mode, this reduces redrawing from +- 180ms to 0.1 ms. A second improvement was made by configuring X11 not repaint the window background when resized, this caused some flickering (it was painted black before being drawn). It now keeps the old content and tells rofi to repaint. This causes trailing, but overall looks nicer.

Removals

We also removed a deprecated option, -opacity. Did option did full window opacity, basically it makes the whole window and text transparent. A very ugly effect. The current argb colors in the theme allow a nice transparency, where only the background of the window is transparent but not the text (you can still reproduce the old style in the new theme format, by making all colors transparent).

Detailed Changelog

New Features

  • Use randr for getting monitor layout. Fallback to xinerama if not available.
  • Re-add fuzzy matcher.
  • Restructure internal code to use dynamic sizing widgets. (hbox, vbox and lists)
  • Async mode for dmenu.
  • Add theme selector script.
  • Include 21 themes.
  • Dynamically sizing window with content.
  • When placed at bottom of screen re-order screen to have entry at bottom.

Improvements

  • Fix pasting secondary clipboard. (#516)
  • By default use all cores to filter entries.
  • Make sure drawing priority is higher then reading input data.
  • Improve resizing of window, don't make X whipe background.
  • Improve close window (shift-delete) action, by sending NET_WM_CLOSE instead of destroying window.
  • Create cache and run directory on startup. (#497)
  • Fix unneeded redraws on cursor blinking. (#491)
  • Improve time till grabbing keyboard. (#494)
  • Better error message when failing to parse keybindings, also continue parsing on error.
  • Fix problem with custom layouts (#485)
  • Speedup drawing of screen. Works well now for 4k and 8k screens. (factor 1000+ speedup for the flipping of buffer) (#496)
  • DRun mode more compatible with specification.
  • Debug output via g_log.
  • Fix password entry cursor position.
  • Use bash instead of sh for get_git_rev.sh (#445)
  • Add Control+G for cancel (#452)
  • Add padding option to textbox (#449)
  • Ctrl-click does alternate accept entry. (#429)
  • Hide window decoration in normal window mode.
  • Click to exit option. (#460)
  • Fix cursor blinking on moving. (#462)
  • Remove entry from history if fails to execute (#466)
  • Fix margins. (#467)
  • Improved documentation of functions in code.
  • DRun: Set work directory when executing file. (#482)
  • Memory leak fixes.
  • Improve scrollbar behaviour.

Removals

  • opacity option. The transparency support in the theme can do the same and more.

1.2.0

7 years ago

V1.2.0 - 8397

New Features

Despite me saying after every release that it is mostly feature complete; new Rofi, new features. However these new features are mostly to improve current functionality and debugging. Below the 4 most important ones.

Underline Match

A new, hopefully welcome, addition is that Rofi now highlights the match in each row:

Rofi Underline

To accomplish this, now all matching is done using GRegex, as this returns the exact location in the string of each match. While I don't see a direct use, it is something a lot of other quick search tools provide, so Rofi could not stay behind.

Multiline Select

While already existing in a very rudimentary form, we now improved the multi-line select in dmenu mode. It will allow you to select and unselect rows, selected rows are highlighted with a dot and a small counter indicated the amount of rows selected.

Rofi Multi Select

Customize Window string

You can now specify what the window switcher will show. It allows for some markup to nicely line up the entries.

For example if the with of the window is specified in characters, this would right align the class name

rofi.window-format: {t:-16} ({c:10})

Rofi Window title align

Track configuration option origin

Rofi now keeps track of how configuration options are set. It will now display if it is the default value, set in Xresources, configuration file or commnadline.

Rofi configuration tracking

This should help debugging recent bugs, where people had an invalid pid path set in the configuration file. Additionally if you dump the configuration, for using on another pc, it will comment the options that are set to their default value. (So f.e. pidfile location won't be overriden).

Bug Fixes

As no tool is without bugs, and Rofi not being the exception, we did manage to squash a few.

  • Fix current desktop window selector.
  • Fix launching application in terminal.
  • Support #include in config file.
  • Fix rofi on 30bit 10 bit per channel display.
  • Correct Control-u behaviour to remove till begin of line. Control-w now whipes the line.
  • Add missing Control-k keybinding, delete till end of line.

Remove features

  • Removed fuzzy finder
  • Remove i3 workarounds. As i3 has, for more than a year now, native support for EWMH.
  • Remove XLib dependency. The last hard dependency on Xlib has been removed by the use of xcb-util-xrm.

1.1.0

7 years ago

New Features

  • Keys mode, showing keybindings.
  • Stop cycling option (#407) (Thx to Yaroslav)
  • Kill window on delete entry (#316)

Improvements

  • Add Control+Backspace as remove word back keybinding.
  • Allow user to use X11 background for fake transparency (#390)
  • Allow user to specify background image.
  • Improved keybinding handling, allowing on-release and modifier only (#384).
  • Use display name for prompt (#409)
  • Parse subdirectories in drun parser (#416)
  • Switch to stop cycling (#407)

Bug fixes

  • Grab mouse pointer with keyboard