mirror of
https://github.com/swaywm/sway.git
synced 2024-11-28 19:01:29 +00:00
Minor cleanup of example services section
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
|
## 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
|
# ~/.config/systemd/user/waybar.service or /etc/systemd/user/waybar.service
|
||||||
[Unit]
|
[Unit]
|
||||||
|
@ -92,9 +92,9 @@ ExecStart=/usr/bin/waybar
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sway-session.target
|
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
|
### swayidle
|
||||||
|
|
||||||
|
@ -107,10 +107,10 @@ PartOf=graphical-session.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/swayidle -w \
|
ExecStart=/usr/bin/swayidle -w \
|
||||||
timeout 300 'swaylock -f -c 000000' \
|
timeout 300 'swaylock -f -c 000000' \
|
||||||
timeout 600 'swaymsg "output * dpms off"' \
|
timeout 600 'swaymsg "output * dpms off"' \
|
||||||
resume 'swaymsg "output * dpms on"' \
|
resume 'swaymsg "output * dpms on"' \
|
||||||
before-sleep 'swaylock -f -c 000000'
|
before-sleep 'swaylock -f -c 000000'
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sway-session.target
|
WantedBy=sway-session.target
|
||||||
|
@ -118,7 +118,7 @@ WantedBy=sway-session.target
|
||||||
|
|
||||||
### mako
|
### mako
|
||||||
|
|
||||||
```
|
```systemd
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=A lightweight Wayland notification daemon
|
Description=A lightweight Wayland notification daemon
|
||||||
Documentation=man:mako(1)
|
Documentation=man:mako(1)
|
||||||
|
|
Loading…
Reference in a new issue