Minor cleanup of example services section

Caleb Bassi 2019-05-15 19:32:26 -07:00
parent 509052d30a
commit 0777f9ec22

@ -75,9 +75,9 @@ Next time you login via gdm/sddm just choose "sway-service", instead of just "sw
## Example service units for other programs
### waybar
### Waybar
An example service file for waybar that will start waybar as part of the sway session, and stop it when graphical-session.target stops:
Starts Waybar as part of the sway session and stops it when `graphical-session.target` stops:
```
# ~/.config/systemd/user/waybar.service or /etc/systemd/user/waybar.service
[Unit]
@ -92,9 +92,9 @@ ExecStart=/usr/bin/waybar
[Install]
WantedBy=sway-session.target
```
and then enable and start it with `systemctl --user enable --now waybar.service`.
Enable and start the service with `systemctl --user enable --now waybar`.
If you want waybar to start for any graphical session, you could replace the `WantedBy=` directive with `WantedBy=graphical-session.target` before enabling it (although it might not make sense to use waybar with gnome or i3).
If you want Waybar to start for any graphical session, you could replace the `WantedBy=` directive with `WantedBy=graphical-session.target` before enabling it (although it might not make sense to use Waybar with gnome or i3).
### swayidle
@ -107,10 +107,10 @@ PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * dpms off"' \
timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
before-sleep 'swaylock -f -c 000000'
[Install]
WantedBy=sway-session.target
@ -118,7 +118,7 @@ WantedBy=sway-session.target
### mako
```
```systemd
[Unit]
Description=A lightweight Wayland notification daemon
Documentation=man:mako(1)