Qball's Weblog

Rofi 1.4.0: Sneak Preview (9): Borders and more borders

Tags Rofi  Theme3.0 

This blog post will talk about borders, border radius and more borders.


In the new theme format, it allows borders to be set on every widget. Not only that, each border can be configured separately. You can specify the different border similar as in css:

border: all
border: top&bottom left&right
border: top, left&right, bottom
border: top, right, bottom, left

Each border can then be set following:

Distance Linestyle

The distance can be specified in px, em and %. Linestyle can be dash and solid.

For example:

rofi -show drun -theme-str '#window mainbox listview box { border: 40px; }'


Or a nice dash border:

rofi -show drun -theme-str '#window mainbox listview box { border: 8px dash; }'


Or only on top and bottom:

rofi -show drun -theme-str '#window mainbox listview { border: 2px dash 0px; }'


Border Radius

The border-radius has the same structure as the border property:

border-radius: all
border-radius: topleft&bottomright toprigh&bottomleft
border-radius: topleft, bottomleft&topright, bottomright
border-radius: topleft, topright, bottomright, bottomleft

When arcing from the left border to the top border, it starts at the left width, and then changes size to the top border.

rofi -show drun -theme-str '#window mainbox listview box { border: 14px 2px; border-radius: 80px 14px 8px; }'


Note this does not work with a dashed line. Dashed line and border-radius needs more work in future.


comments powered by Disqus