summaryrefslogtreecommitdiffstats
path: root/releasenotes/1.7.0/release-1.7.0.markdown
blob: 13ead6c7268eee9533d44c38339b4570720eef7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# 1.7.0: Iggy 2024

![Iggy](./iggy.jpg)

Rofi 1.7.0 is another bug-fix release that also removes a lot of deprecated features.   One of the biggest changes is
the removal of the (deprecated) xresources based configuration setup. With this removal, also a lot of hack-ish code has
been removed that tried to patch old config setups.  While the deprecation might be frustrating for people who have not
yet converted to the new format, I hope for some understanding. Even though this move might not be popular, the
deprecation in previous releases and consequential removal of these options is needed for two reasons.
The most important one is to keep rofi maintainable and secondary to open possibility to overhaul the config system in
the future and with that fixing some long standing bugs and add new options that
where hindered by the almost 10 year old system, the new system has been around for more than 4 years.

Beside mostly bug-fixes and removal of deprecated options, we also improved the theming and added features to help in
some of the more 'off-script' use of rofi.

This release was made possible by many contributors, see below for a full list. Big thanks again to SardemFF7 and
TonCherAmi.

## File Browser

TonCherAmi made several very nice usability improvements to the file-browser. His changes allow you to define sorting
and ordering of the entries and changing the default start directory.

These options can be set using the new 'nested' configuration format that we are testing in rofi:

```css
configuration {
   filebrowser {
      /** Directory the file browser starts in. */
      directory: "/some/directory";
      /**
        * Sorting method. Can be set to:
        *   - "name"
        *   - "mtime" (modification time)
        *   - "atime" (access time)
        *   - "ctime" (change time)
        */
      sorting-method: "name";
      /** Group directories before files. */
      directories-first: true;
   }
}
```


## File Completion

In rofi 1.7.0 a long awaited patch I wrote many years ago landed into the rofi.
This patch adds some basic completion support by chaining modi. Currently it
only supports chaining the FileBrowser mode. This allows you to launch an
application with a file as argument.  This is currently supported in the Run
and the DRun modi by pressing the `Control-l` keybinding.  For the Run mode it
will add it as first argument, in DRun it only works if the Desktop file
indicates support for this.

![completer](./complete.gif)

This is not the final implementation, but a first investigation in how to
add/extend this feature. Ideally you can have multiple completers (including
custom ones) you can choose from.


## Timeout actions

You can now configure an action to be taken when rofi has not been interacted
with for a certain amount of seconds. You can specify a keybinding to trigger
after X seconds.

This option can be set using the new 'nested' configuration format that we are
testing in rofi:

```css
configuration {
  timeout {
      delay:  15;
      action: "kb-cancel";
  }
}
```

This setting will close rofi after 15 seconds of no interaction.

```css
configuration {
  timeout {
      delay:  5;
      action: "kb-accept";
  }
}
```
This setting will accept the current selection after 5 seconds of no
interaction.

## Background image and gradients

To improve theming the `background-image` property was added with support for
setting images `url()` or a gradient `linear-gradient()`.

```css
window {
    background-image: url("/tmp/i3.png", both);
}
element {
    children: [element-icon, element-text];
    background-image: linear-gradient(to bottom, black/20%, white/20%, black/10%);
}
```

The below screenshot shows both background image and gradients.

![background image](./background-image.png)

Or a more subtle change is the gradient on the tabs here:

![iggy-theme](./iggy-theme.png)


## Clickable button and icons

```css
icon-paste {
    expand: false;
    filename: "gtk-paste";
    size: 24;
    vertical-align: 0.5;
    action: "kb-primary-paste";
}
```

```css
button-paste {
    expand: false;
    content: "My Clickable Message";
    vertical-align: 0.5;
    action: "kb-primary-paste";
}
```

The screenshot below shows a non-squared image and clickable buttons (the close icon in the top right)

![rofi icons](./rofi-icons.png)


# Changelog

* ADD: -steal-focus option.

Explicitly steal focus from from the current window and restore it on closing.
Enabling this might break the window switching mode.

* ADD: [Config] Add nested configuration option support.

Allow for nested configuration options, this allows for options to be grouped.

```css
configuration {
  timeout {
      delay:  15;
      action: "kb-cancel";
  }
  combi {
    display-name: "Combi";
  }
}

```


* ADD: [Config] Support for handling dynamic config options.

A quick work-around for handling old-style dynamic options. This should be resolved when all options are
converted to the new (internal) config system.

* ADD: [DRun] Add fallback icon option.
This option allows you to set a fallback icon from applications.
```css
configuration {
  application_fallback_icon: "my-icon";
}
```

* ADD: [IconFetcher] Find images shipped with the theme.

If you have an icon widget you can specify an image that exists in the theme directory.
```css

window {
  background-image: url("iggy.jpg", width);
}
```

* ADD: [DRun] Add support for passing file (using file-browser) completer for desktop files that support his.

See above.

* ADD: [DRun] Support for service files.

Support KDE service desktop files.

* ADD: [FileBrowser] Allow setting startup directory (#1325)
* ADD: [FileBrowser]: Add sorting-method. (#1340)
* ADD: [FileBrowser] Add option to group directories ahead of files. (#1352)

See above.

* ADD: [Filtering] Add prefix matching method. (#1237)

This matching method matches each entered word to start of words in the target
entry.

* ADD: [Icon] Add option to square the widget.

By default all icons are squared, this can now be disabled. The icon will
occupy the actual space the image occupies.

* ADD: [Icon|Button] Make action available on icon, button and keybinding name.

See above.

* ADD: [KeyBinding] Add Ctrl-Shift-Enter option. (#874)

This combines the custom and alt keybinding. Allowing a custom command to be
launched in terminal.

* ADD: [ListView]-hover-select option. (#1234)

Automatically select the entry under the mouse cursor.

* ADD: [Run] Add support for passing file (using file-browser) completer.

See above.

* ADD: [Textbox] Allow theme to force markup on text widget.

Force markup on text widgets.

* ADD: [Theme] theme validation option. (`-rasi-validate`)
* ADD: [View] Add support for user timeout and keybinding action.
* ADD: [Widget] Add cursor property (#1313)

Add support for setting the mouse cursor on widgets.
For example the entry cursor on the textbox, or click hand cursor on the entry.

```css
element,element-text,element-icon, button {
    cursor: pointer;
}

```

* ADD: [Widget] Add scaling option to background-image.

Allows you to scale the `background-image` on width, height and both.
See above example.

* ADD: [Widget] Add support background-image and lineair gradient option.

See above.

* ADD: [Window] Add pango markup for window format (#1288)

Allows you to use pango-markup in the window format option.


* ADD: [Window] Allow rofi to stay open after closing window.

```css
configuration {
  window {
      close-on-delete: false;
  }
}

```

* FIX: [DSL] Move theme reset into grammar parser from lexer.

Given how the lexer and the grammar parser interact, the reset did not happen at
the right point in the parsing process, causing unexpected behaviour.

* FIX: [Drun]: fix sorting on broken desktop files. (thanks to nick87720z)

Broken desktop files could cause a rofi crash.

* FIX: [File Browser]: Fix escaping of paths.

Fix opening files with special characters that needs to be escaped.

* FIX: [ListView] Fix wrong subwidget name.

Fixes theming of `element-index`.

* FIX: [Script] Don't enable custom keybindings by default.

The quick switch between modi was broken when on a script mode. This now by default works,
unless the mode overrides this.

* FIX: [TextBox] Fix height estimation.

This should fix themes that mix differently sized fonts.

* FIX: [Theme] widget state and inherited properties. This should help fixing some old themes with changes from 1.6.1.

An old pre-1.6.1 rasi theme should work with the following section added:

```css
element-text {
    background-color: inherit;
    text-color:       inherit;
}
```

* FIX: [Widget] Fix rendering of border and dashes. (Thanks to nick87720z)

This fixes the long broken feature of dashed borders.

```css
message {
    padding:      1px ;
    border-color: var(separatorcolor);
    border:       2px dash 0px 0px ;
}

```

* FIX: [Build] Fix CI.

* REMOVE: -dump-xresources
* REMOVE: -fullscreen
* REMOVE: -show-match
* REMOVE: Old xresources based configuration file.
* REMOVE: fake transparency/background option, part of theme now.
* REMOVE: xresources parsing via Xserver
* Remove: [Theme] Remove backwards compatiblity hack.
* DOC: Update changes to manpages


# Thanks

Big thanks to:

* Quentin Glidic
* a1346054
* Ian C
* TonCherAmi
* nick87720z
* Markus Grab
* Zachary Freed
* nickofolas
* unisgn
* Jas
* rahulaggarwal965
* Awal Garg
* Eduard Lucena
* Lars Wendler

Apologies if I mistyped or missed anybody.