mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
[Doc] update rofi-script to hint about coproc.
Thx to jose1711
This commit is contained in:
parent
347bc9517c
commit
53533acb77
2 changed files with 30 additions and 1 deletions
|
@ -163,6 +163,23 @@ multiple entries can be passed using the \fB\fC\\x1f\fR separator.
|
|||
.fi
|
||||
.RE
|
||||
|
||||
.SH Executing external program
|
||||
.PP
|
||||
If you want to launch an external program from the script, you need to make sure it is launched in the background.
|
||||
If not rofi will wait for its output (to display).
|
||||
|
||||
.PP
|
||||
In bash the best way to do this is using \fB\fCcoproc\fR\&.
|
||||
|
||||
.PP
|
||||
.RS
|
||||
|
||||
.nf
|
||||
coproc ( myApp > /dev/null 2>\&1 )
|
||||
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.SH DASH shell
|
||||
.PP
|
||||
If you use the \fB\fCdash\fR shell for your script, take special care with how dash handles escaped values for the separators.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## NAME
|
||||
|
||||
**rofi script mode** - Rofi format for scriptable modi.
|
||||
**rofi script mode** - Rofi format for scriptable modi.
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
|
@ -108,6 +108,18 @@ multiple entries can be passed using the `\x1f` separator.
|
|||
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
|
||||
```
|
||||
|
||||
## Executing external program
|
||||
|
||||
If you want to launch an external program from the script, you need to make sure it is launched in the background.
|
||||
If not rofi will wait for its output (to display).
|
||||
|
||||
In bash the best way to do this is using `coproc`.
|
||||
|
||||
```bash
|
||||
coproc ( myApp > /dev/null 2>&1 )
|
||||
```
|
||||
|
||||
|
||||
## DASH shell
|
||||
|
||||
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
|
||||
|
|
Loading…
Reference in a new issue