Rofi 1.4.0: Sneak Preview (8): Reordering April 11, 2017

A short one today on the structure of rofi.

The structure of rofi gui is pretty static, as depicted in this now familiar picture:

In a future release this will become more flexible, but for now it is fixed. Kinda. There is one trick that allows you to re-order at least part of it. You can set in what order the different widgets are packed.

For example if we set:

rofi -show drun -theme-str '#window mainbox inputbar box { index: 4;}'

The input bar is placed at the bottom.

This works on every box packing, so widgets in mainbox , in inputbar , in listview (the scrollbar).

Note: The index property is not inherited from the widgets parents.

For example:

rofi -show top -theme-str '#window mainbox message box { index: 4;} #window mainbox inputbar prompt { index: 3;}'

In the above screenshots this does not look very good, however if you make a theme that is placed at the bottom of the it can look nice.

Now this does look a bit weird when you filter the list (if it is static).

There is actually an option to fix this.

Reordering the listview

The listview widget has an option to reverse the order.

#window mainbox listview { reverse : true ; }

Try this:

rofi -show drun -theme-str '#window mainbox message box { index: 4;} #window mainbox inputbar prompt { index: 4;} #window mainbox listview {reverse: true;}'

The order of the listview is then reversed:

If you then enable the dynamic: true; fixed-height: false; mode it behaves very natural (imho).

Please enable JavaScript to view the comments powered by Disqus.

Disqus

Copyright 2005-2017: Dave Davenport - Theme by webjeda