Skip to content

Releases: davatorium/rofi

The Masked Launcher

06 Sep 18:42
Compare
Choose a tag to compare

1.6.0: The Masked Launcher

More then 2 years after the 1.5.0 release and a year after 1.5.4, we present rofi 1.6.0. This release
is again focusses bug-fixing and improving the experience for themers and
script developers. The script mode has been extended with many small requested tweaks to get it more
on par with dmenu mode. For themers the listview has been made more flexible, allowing more fancy themes,
for examples mimicking Gnomes application launcher or albert.

Big thanks to SardemFF7 and all the other
contributors, without their support and contributions this release would not
have been possible.

Script mode

Rofi now communicates some information back to the script using environment variables.
The most important one, is ROFI_RETV, this is equal to the return value in dmenu mode.
It can have the following values:

  • 0: Initial call of script.
  • 1: Selected an entry.
  • 2: Selected a custom entry.
  • 10-28: Custom keybinding 1-19

To fully read up on all features of script mode, there is now a rofi-script(5) manpage.

Some of the new features are:

  • Search invisible text
  • Pass extra information back on selection
  • Support for a custom delimiter
  • Support for dmenus no-custom option
  • Detect if launched from rofi

To test some of the features:

#!/usr/bin/env bash

if [ -z "${ROFI_OUTSIDE}" ]
then
    echo "run this script in rofi".
    exit
fi

echo -en "\x00no-custom\x1ftrue\n"
echo -en "${ROFI_RETV}\x00icon\x1ffirefox\x1finfo\x1ftest\n"

if [ -n "${ROFI_INFO}" ]
then
    echo "my info: ${ROFI_INFO} "
fi

Theme

There have been a set of tweaks to the theme format, making it more flexible and hopefully more themer-friendly.

Listview flexibility

This is one of the biggest change, instead of the listview having a hacked
textbox as elements. It now re-uses existing widgets like box, icon and
textbox. This way you can re-structure how it looks. For example put the icon
above the text.

Icons

With theme:

element {
  orientation: vertical;
}

This will make the box element put element-icon and element-text in a vertical list.

or change the ordering to show icon on the right:

element {
  children: [element-text, element-icon];
}

Icons vertical

icon warning
This causes a breaking change for themes, to modify the highlighting, this should be set to element-text.
Or inherited. element-text { highlight: inherit; }.

If you override the build in theme, you might want to set icon size:

element-icon {
    size:             1.2em ;
}

Calculation support in theme format.

Rofi adds CSS like calculations in the CSS format for distances.
You can now set the width of the window to the screen width minus a 10 pixels.

window {
    width: calc(100% - 10px);
}

It supports: -, +, /, * and % operators and they should be surrounded by whitespace.

Initial media support

This is a very initial implementation of CSS like @media support. This allows you to modify the theme
based on screen size or ratio.

We currently support: minimum width, minimum height, maximum width, maximum
height, monitor id, minimum acpect ratio or maximum acpect ratio.

For example, go to fullscreen mode on screens smaller then full HD:

@media (max-width: 1920 ) {
  window {
    fullscreen: true;
  }
}

List of Changes

  • Add themes/ directory in the users rofi config directory to the theme search path. (#1001)
  • Split listview element into box widget holding icon and textbox. Supporting more dynamic themes. (#949)
  • Fix default theme.
  • Add -upgrade-config option.
  • Add ROFI_PLUGIN_PATH variable.
  • Add check for running rofi inside a Script mode.
  • Remove gnome-terminal from rofi-sensible-terminal (#1074)
  • Set window title based on mode name. (#969)
  • Subpixel rendering workaround. (#303)
  • Support character type in configuration {} block . (#1131)
  • Use XDG_CONFIG_DIRS (#1133)
  • [Box] Bug fix update propagation.
  • [Build] Fix meson build with meson 0.55.
  • [DMenu] Add -keep-right flag. (#1089)
  • [DMenu] Don't match markup when filtering. (#579,#1128)
  • [DRUN] Support Type=Link (#1166)
  • [DRun] Add % to escape variable.
  • [DRun] Add an optional cache for desktop files. (#1040)
  • [DRun] Add keywords as default match item. (#1061)
  • [DRun] Don't run custom commands.
  • [DRun] Match keywords field.
  • [DRun] Only show selected categories. (#817)
  • [Dmenu|Script] Add non-selectable entries. (#1024)
  • [Doc] Update documentation.
  • [IconFetcher] Add jpeg support.
  • [Icon] Set default size to 1.2 CH.
  • [Icon] support distance for size.
  • [Listview] Add widget to show keybinding index. (#1050)
  • [Listview] Fix distribution of remaining space.
  • [Listview] Fix left-to-right scrolling. (#1028)
  • [Listview] Fix updating elements. (#1032)
  • [Matching] Make Fuzzy matching non greedy.
  • [Script] Add delimiter option. (#1041)
  • [Script] Add environment variable indicating state.
  • [Script] Add extra matchign field (meta). (#1052)
  • [Script] Add info option, hidden field that gets passed to script via ROFI_INFO environment.
  • [Script] Add no-custom option.
  • [Textbox] Add cursor blinking option.
  • [Textbox] Add placeholder. (#1020)
  • [Theme] Add calc() support. (#1105)
  • [Theme] Add alpha channel to highlight color. (#1033)
  • [Theme] Add sidebar as mode-switcher alias.
  • [Theme] Add some initial @media support. (#893)
  • [Theme] Support buttons in the UI.
  • [View] Add two widgets. One showing number of rows, other number of filtered rows. (#1026)
  • [Window] Add window thumbnail option.
  • [Window] Remove arbitrary # window limit. (#1047)
  • [Window] check buffer overflow.

Painful tardiness

26 Jun 19:33
Compare
Choose a tag to compare

Quick bug-fix release to fix a crasher in SSH dialog.

Time delayed progress

23 Jun 13:18
Compare
Choose a tag to compare

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

There is one breaking change in the theme naming and there are a few small new features (tweaks) in this release.

Sidebar renamed to mode-switcher

The selection buttons to select between the different modi was still called sidebar a remnant from the past.
This has now been renamed to mode-switcher.

Icons in dmenu

Just like in window,drun and script modi you can add icons to the list in dmenu mode.

The syntax is similar to the script modi:

echo -en "Firefox\0icon\x1ffirefox\ngimp\0icon\x1fgimp" | rofi -dmenu -no-config -show-icons

dmenu icons

The entries are separated by a \n newline (normal dmenu behaviour).
The extra parameters can be added after a \0 null character, the key and value are separated by a \x1f unit
separator character.

Ellipsizing listview entries

If you have very long entries in your view that get ellipsized (cut off at the end indicated by ...) you can now select,
at runtime, where they are cut off (start, middle or end).

You cycle through the options with the the alt+. keybinding.

Start:

dmenu ellipsize

Middle:

dmenu ellipsize

End:

dmenu ellipsize

Full Changelog

The full list of fixes and updates:

  • Update manpage with missing entry. (#937)
  • Rename sidebar widget to mode-switcher and allow configuration from theme.
  • Timing: Moving timing output to glib debug system.
  • SSH: Fix unitialized variable issue.
  • SSH: resolve ':' conflict in history entries.
  • SSH: be case-insensitive when parsing keywords.
  • RASI Lexer: Fix nested () in variable default field.
  • USABILITY: When mode not found, show in gui not just on commandline.
  • ICON: Allow aligning image in icon widget.
  • Meson build system: cleanups and improvements.
  • Meson build system: add documentation (#943)
  • Window: Fix default formatting and remove (invalid) deprecation warning.
  • DMenu: Add support for showing icons infront of displayed list.
  • Overlay: Fix overlay widget to correctly integrate in new theme format.
  • Update libnkutils, libgwater.
  • DMENU: Add format option to strip pango markup from return value.
  • ListView: allow user to change ellipsizing displayed value at run-time.

1.5.2: Procrastination in progress

30 Dec 12:16
Compare
Choose a tag to compare

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.

V1.5.1:

18 Mar 12:08
Compare
Choose a tag to compare

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.

V1.5.0: The Hoff uses it.

01 Feb 20:57
Compare
Choose a tag to compare

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)

v1.4.2: DuckHunt

15 Oct 09:02
Compare
Choose a tag to compare
  • 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: All Hail Rasi

26 Sep 19:46
Compare
Choose a tag to compare
  • Fixed version number meson.

V1.4.0: I reject your truth and trumpstitute my own

26 Sep 19:15
Compare
Choose a tag to compare

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.

Dan vs. Greg: The never ending story, reloaded.

08 Jan 13:14
Compare
Choose a tag to compare

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)