Rofi: Lowercase and uppercase element style

Created on 1 Sep 2019  路  6Comments  路  Source: davatorium/rofi

Version

1.5.4

Launch Command

rofi -show drun

Steps to reproduce

rofi -show drun -theme-str '#element { text-transform: lowercase; }'

or

/* theme.rasi */
element {
   text-transform: lowercase;
}

What behaviour you see

A theme error of unexpected invalid property value.

What behaviour you expect to see

A list of entries that have a lowercase style applied to them.


I was surprised to see this old video (2015, 00:29:45) to somehow have lowercased elements.

I did notice text-transform does not seem to be supported, but is this perhaps possible in a different way?

The option drun-display-format seemed promising at first, but I did not manage to figure out how to pass lowercase text to that in the Pango markup language.

Nice To Have

All 6 comments

it is lower case when the input is lowercase (as in the video) most binaries found by run mode are lowercase. This is still the case in the current version.
So not sure what is the problem.

text-transform does not exist.

most binaries found by run mode are lowercase

That makes sense. I was using drun due to the formatting. For example, the application Spotify in drun shows up as com.spotify.Client with run.

So not sure what is the problem.

I only wanted to change the style of some elements, so it purely is a stylistic issue I encountered while creating a theme.

text-transform does not exist.

Indeed, I noticed there was no such entry in the Themes wiki. The theming options grant a lot of flexibility, so I tried the css text-transform attribute, assuming there might have been a mapping to it.

Thank you for answering and the wonderful tool.

Might be nice to add .

Looked into this, regrettable pango does not give me an easy option to implement this.

No capatalize option (in pango or glib).
No lower/upper in pango markup tags.
pango markup breaks with uppercased.

That's unfortunate, but thanks for looking into this @DaveDavenport!

No capatalize option (in pango or glib).
No lower/upper in pango markup tags.

I assume Pango only covers these options? I gave those a quick look and I could not figure it out either.

pango markup breaks with uppercased.

I'm not familiar with C unfortunately, but do you mean to say that it falls apart by using, for example, string.toUpperCase() or string.toLowerCase()?

I'm not familiar with C unfortunately, but do you mean to say that it falls apart by using, for example, string.toUpperCase() or string.toLowerCase()?

Exactly it fails on the toUpper. I have a patch that implements everything (grammar and the like) but this is the blocking point.. Just having a toupper/tolower would be ok.

Was this page helpful?
0 / 5 - 0 ratings