mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[Doc] Add example run command with cgroup support (#1752)
Adds an example command to launch processes via systemd-run into a dedicated systemd scope within the users slice, which allows using systemd-oomd, that evaluates memory consumption on a per cgroup basis. The systemd-run arguments are chosen in alignment with systemds desktop environment integration recommendations¹. [1] https://systemd.io/DESKTOP_ENVIRONMENTS/ Co-Authored-By: Dave Davenport <qball@blame.services> Co-authored-by: Dave Davenport <qball@blame.services>
This commit is contained in:
parent
ffe3289999
commit
ee2ab5b7f9
2 changed files with 18 additions and 0 deletions
12
doc/rofi.1
12
doc/rofi.1
|
@ -901,6 +901,18 @@ See \fIPATTERN\fP\&.
|
||||||
.PP
|
.PP
|
||||||
Default: \fI{cmd}\fP
|
Default: \fI{cmd}\fP
|
||||||
|
|
||||||
|
.PP
|
||||||
|
Example to run applications in a dedicated cgroup with systemd. Requires a shell to escape and interpolate the unit name correctly.
|
||||||
|
|
||||||
|
.PP
|
||||||
|
.RS
|
||||||
|
|
||||||
|
.nf
|
||||||
|
"bash -c 'systemd-run --user --unit=app-rofi-\\$(systemd-escape {cmd})-\\$RANDOM {cmd}'"
|
||||||
|
|
||||||
|
.fi
|
||||||
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
\fB\fC-run-shell-command\fR \fIcmd\fP
|
\fB\fC-run-shell-command\fR \fIcmd\fP
|
||||||
|
|
||||||
|
|
|
@ -543,6 +543,12 @@ See *PATTERN*.
|
||||||
|
|
||||||
Default: *{cmd}*
|
Default: *{cmd}*
|
||||||
|
|
||||||
|
Example to run applications in a dedicated cgroup with systemd. Requires a shell to escape and interpolate the unit name correctly.
|
||||||
|
|
||||||
|
```
|
||||||
|
"bash -c 'systemd-run --user --unit=app-rofi-\$(systemd-escape {cmd})-\$RANDOM {cmd}'"
|
||||||
|
```
|
||||||
|
|
||||||
`-run-shell-command` *cmd*
|
`-run-shell-command` *cmd*
|
||||||
|
|
||||||
Set command to execute when running an application in a shell.
|
Set command to execute when running an application in a shell.
|
||||||
|
|
Loading…
Reference in a new issue