diff --git a/doc/rofi.1 b/doc/rofi.1 index b2eb5db2..20db729f 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -901,6 +901,18 @@ See \fIPATTERN\fP\&. .PP 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 \fB\fC-run-shell-command\fR \fIcmd\fP diff --git a/doc/rofi.1.markdown b/doc/rofi.1.markdown index 2f8a82e4..73d94af6 100644 --- a/doc/rofi.1.markdown +++ b/doc/rofi.1.markdown @@ -543,6 +543,12 @@ See *PATTERN*. 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* Set command to execute when running an application in a shell.