Browse Source

readme: create usage sections

Fabian Peter Hammerle 3 years ago
parent
commit
89ea939a49
1 changed files with 12 additions and 6 deletions
  1. 12 6
      README.md

+ 12 - 6
README.md

@@ -21,24 +21,30 @@ On debian-based systems, dependencies can optionally be installed via:
 $ sudo apt-get install --no-install-recommends python3-dbus python3-gi python3-paho-mqtt
 ```
 
+## Usage
+
+### Schedule Poweroff
+
 Schedule poweroff by sending a MQTT message to topic `systemctl/hostname/poweroff`.
 
 ```sh
 $ mosquitto_pub -h MQTT_BROKER -t systemctl/hostname/poweroff -n
 ```
 
-Lock screen by sending a MQTT message to topic `systemctl/hostname/lock-all-sessions`.
-
-```
-$ mosquitto_pub -h MQTT_BROKER -t systemctl/hostname/lock-all-sessions -n
-```
-
 ### Shutdown Report
 
 `systemctl-mqtt` subscribes to [logind](https://freedesktop.org/wiki/Software/systemd/logind/)'s `PrepareForShutdown` signal.
 
 `systemctl halt|poweroff|reboot` triggers a message with payload `true` on topic `systemctl/hostname/preparing-for-shutdown`.
 
+### Lock Screen
+
+Lock screen by sending a MQTT message to topic `systemctl/hostname/lock-all-sessions`.
+
+```
+$ mosquitto_pub -h MQTT_BROKER -t systemctl/hostname/lock-all-sessions -n
+```
+
 ## Home Assistant 🏡
 
 ### Sample Setup