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

[Doc] Add new -display-{mode} method to manpage.

This commit is contained in:
Dave Davenport 2021-06-15 14:04:34 +02:00
parent b541bf55bc
commit 3307d62c55
3 changed files with 30 additions and 1 deletions

View file

@ -1151,6 +1151,22 @@ Make \fBrofi\fP create a pid file and check this on startup. The pid file preven
.PP
Set the name to use for mode. This is used as prompt and in combi\-browser.
.PP
It is now prefered to use the configuration file:
.PP
.RS
.nf
configuration {
{mode} {
display\-name: *string*;
}
}
.fi
.RE
.PP
\fB\fC\-click\-to\-exit\fR
\fB\fC\-no\-click\-to\-exit\fR

View file

@ -724,6 +724,17 @@ Make **rofi** create a pid file and check this on startup. The pid file prevents
Set the name to use for mode. This is used as prompt and in combi-browser.
It is now prefered to use the configuration file:
```css
configuration {
{mode} {
display-name: *string*;
}
}
```
`-click-to-exit`
`-no-click-to-exit`

View file

@ -153,10 +153,12 @@ void mode_set_private_data ( Mode *mode, void *pd )
const char *mode_get_display_name ( const Mode *mode )
{
/** Find the widget */
ThemeWidget *wid = rofi_config_find_widget ( mode->name, NULL, TRUE );
if ( wid ) {
/** Check string property */
Property *p = rofi_theme_find_property ( wid, P_STRING, "display-name", FALSE );
if ( p != NULL ) {
if ( p != NULL && p->type == P_STRING ) {
return p->value.s;
}
}