1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Update changelog a bit.

This commit is contained in:
Dave Davenport 2020-07-05 11:41:04 +02:00
parent d6ac2f0f5b
commit fc0ea0b22e
2 changed files with 34 additions and 9 deletions

View file

@ -15,14 +15,24 @@ have been possible.
## Script mode ## 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:
* Support for invisible search text * **0**: Initial call of script.
* Support for passing extra information back on selection * **1**: Selected an entry.
* Support for custom keybindings * **2**: Selected a custom entry.
* Support for custom delimiter * **10-28**: Custom keybinding 1-19
* Support for dmenus no-custom option
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
## Theme ## Theme
@ -32,12 +42,24 @@ There have been a set of tweaks to the theme format, making it more flexible and
### Listview flexibility ### Listview flexibility
Instead of the listview having a hacked textbox as elements. It now re-uses existing widgets like box, icon and textbox. This is one of the biggest change, instead of the listview having a hacked
This way you can re-structure how it looks. For example put the icon above the text. 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](./icons.png) ![Icons](./icons.png)
With theme:
```css
element {
orientation: vertical;
}
```
This will make the box `element` put `element-icon` and `element-text` in a vertical list.
### Calculation support in theme format. ### Calculation support in theme format.
@ -50,6 +72,9 @@ window {
} }
``` ```
It supports: `-`, `+`, `/`, `*` and `%` operators and they should be surrounded by whitespace.
### Initial media support ### Initial media support
This is a very initial implementation of CSS like `@media` support. This allows you to modify the theme This is a very initial implementation of CSS like `@media` support. This allows you to modify the theme

View file

@ -328,7 +328,7 @@ static void barview_draw ( widget *wid, cairo_t *draw )
if ( lv->barview.direction == LEFT_TO_RIGHT ) { if ( lv->barview.direction == LEFT_TO_RIGHT ) {
for ( unsigned int i = 0; i < max && width > 0; i++ ) { for ( unsigned int i = 0; i < max && width > 0; i++ ) {
update_element ( lv, i, i + offset, TRUE ); update_element ( lv, i, i + offset, TRUE );
int twidth = widget_get_desired_width ( lv->boxes[i].box );//textbox_get_desired_width ( WIDGET ( lv->boxes[i].textbox ) ); int twidth = widget_get_desired_width ( WIDGET ( lv->boxes[i].box ) );
if ( twidth >= width ) { if ( twidth >= width ) {
if ( !first ) { if ( !first ) {
break; break;
@ -348,7 +348,7 @@ static void barview_draw ( widget *wid, cairo_t *draw )
else { else {
for ( unsigned int i = 0; i < lv->cur_elements && width > 0 && i <= offset; i++ ) { for ( unsigned int i = 0; i < lv->cur_elements && width > 0 && i <= offset; i++ ) {
update_element ( lv, i, offset - i, TRUE ); update_element ( lv, i, offset - i, TRUE );
int twidth = widget_get_desired_width ( lv->boxes[i].box );// int twidth = textbox_get_desired_width ( WIDGET ( lv->boxes[i].textbox ) ); int twidth = widget_get_desired_width ( WIDGET ( lv->boxes[i].box ) );
if ( twidth >= width ) { if ( twidth >= width ) {
if ( !first ) { if ( !first ) {
break; break;