chiark / gitweb /
unit: add ConditionACPower=
[elogind.git] / man / systemd.unit.xml
index 35644d38a666c68dd1b7c0d37aeabbca1a624e33..8570815ad47e07fdf577e9bf89f90591f82d55b8 100644 (file)
                         <entry>User name</entry>
                         <entry>This is the name of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
                       </row>
+                      <row>
+                        <entry><literal>%U</literal></entry>
+                        <entry>User uid</entry>
+                        <entry>This is the uid of the configured user of the unit, or (if none is set) the user running the systemd instance.</entry>
+                      </row>
                       <row>
                         <entry><literal>%h</literal></entry>
                         <entry>User home directory</entry>
                                 <term><varname>ConditionSecurity=</varname></term>
                                 <term><varname>ConditionCapability=</varname></term>
                                 <term><varname>ConditionHost=</varname></term>
+                                <term><varname>ConditionACPower=</varname></term>
                                 <term><varname>ConditionNull=</varname></term>
 
                                 <listitem><para>Before starting a unit
                                 The test may be negated by prepending
                                 an exclamation mark.</para>
 
+                                <para><varname>ConditionACPower=</varname>
+                                may may be used to check whether the
+                                system has AC power, or is exlcusively
+                                battery powered at the time of
+                                activation of the unit. This takes a
+                                boolean argument. If set to
+                                <varname>true</varname> the condition
+                                will hold only if at least one AC
+                                connector of the system is connected
+                                to a power source, or if no AC
+                                connectors are known. Conversely, if
+                                set to <varname>false</varname> the
+                                condition will hold only if there is
+                                at least one AC connector known and
+                                all AC connectors are disconnected
+                                from a power source.</para>
+
                                 <para>Finally,
                                 <varname>ConditionNull=</varname> may
                                 be used to add a constant condition