mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
[Doc] Add new -display-{mode} method to manpage.
This commit is contained in:
parent
b541bf55bc
commit
3307d62c55
3 changed files with 30 additions and 1 deletions
16
doc/rofi.1
16
doc/rofi.1
|
@ -1151,6 +1151,22 @@ Make \fBrofi\fP create a pid file and check this on startup. The pid file preven
|
||||||
.PP
|
.PP
|
||||||
Set the name to use for mode. This is used as prompt and in combi\-browser.
|
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
|
.PP
|
||||||
\fB\fC\-click\-to\-exit\fR
|
\fB\fC\-click\-to\-exit\fR
|
||||||
\fB\fC\-no\-click\-to\-exit\fR
|
\fB\fC\-no\-click\-to\-exit\fR
|
||||||
|
|
|
@ -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.
|
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`
|
`-click-to-exit`
|
||||||
`-no-click-to-exit`
|
`-no-click-to-exit`
|
||||||
|
|
||||||
|
|
|
@ -153,10 +153,12 @@ void mode_set_private_data ( Mode *mode, void *pd )
|
||||||
|
|
||||||
const char *mode_get_display_name ( const Mode *mode )
|
const char *mode_get_display_name ( const Mode *mode )
|
||||||
{
|
{
|
||||||
|
/** Find the widget */
|
||||||
ThemeWidget *wid = rofi_config_find_widget ( mode->name, NULL, TRUE );
|
ThemeWidget *wid = rofi_config_find_widget ( mode->name, NULL, TRUE );
|
||||||
if ( wid ) {
|
if ( wid ) {
|
||||||
|
/** Check string property */
|
||||||
Property *p = rofi_theme_find_property ( wid, P_STRING, "display-name", FALSE );
|
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;
|
return p->value.s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue