mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 09:51:29 +00:00
Formatting & highlighting
parent
e23ef47dd0
commit
b8e0fcc35c
|
@ -8,7 +8,7 @@ In order to integrate sway with systemd and start user applications automaticall
|
|||
|
||||
To configure the sway session target, place the following systemd unit file either locally at `~/.config/systemd/user/sway-session.target`, or globally for all users at `/etc/systemd/user/sway-session.target`:
|
||||
|
||||
```
|
||||
```ini
|
||||
[Unit]
|
||||
Description=sway compositor session
|
||||
Documentation=man:systemd.special(7)
|
||||
|
@ -46,7 +46,7 @@ See #5160 for finer details on some discussion around this.
|
|||
|
||||
Place the following unit file either at `~/.config/systemd/user/sway.service` or `/etc/systemd/user/sway.service`:
|
||||
|
||||
```
|
||||
```ini
|
||||
[Unit]
|
||||
Description=sway - SirCmpwn's Wayland window manager
|
||||
Documentation=man:sway(5)
|
||||
|
@ -66,7 +66,7 @@ TimeoutStopSec=10
|
|||
This service file will load environment variables from `~/.config/sway/env`, a [KEY=VALUE file](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#EnvironmentFile=). That's a good place to put variables such as `_JAVA_AWT_WM_NONREPARENTING=1` or `CLUTTER_BACKEND=wayland` (note: no need for export there, that is not a shell file).
|
||||
|
||||
Now, you want your login manager to start the service via systemd, and not sway directly. In order to do that, it's easiest to just create a new wayland session in `/usr/share/wayland-sessions/sway-session.desktop`:
|
||||
```
|
||||
```ini
|
||||
[Desktop Entry]
|
||||
Name=Sway Service
|
||||
Comment=SirCmpwn's Wayland window manager as a systemd service
|
||||
|
@ -74,7 +74,7 @@ Exec=sway-service.sh
|
|||
Type=Application
|
||||
```
|
||||
and put the sway-service.sh somewhere on your PATH (`/usr/local/bin/sway-service.sh` should be fine):
|
||||
```
|
||||
```sh
|
||||
#! /bin/sh
|
||||
|
||||
# first import environment variables from the login manager
|
||||
|
@ -90,7 +90,7 @@ Next time you login via gdm/sddm just choose "sway-service", instead of just "sw
|
|||
### Waybar
|
||||
|
||||
Starts Waybar as part of the sway session and stops it when `graphical-session.target` stops:
|
||||
```
|
||||
```ini
|
||||
# ~/.config/systemd/user/waybar.service or /etc/systemd/user/waybar.service
|
||||
[Unit]
|
||||
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
|
||||
|
@ -110,7 +110,7 @@ If you want Waybar to start for any graphical session, you could replace the `Wa
|
|||
|
||||
### swayidle
|
||||
|
||||
```
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Idle manager for Wayland
|
||||
Documentation=man:swayidle(1)
|
||||
|
@ -130,7 +130,7 @@ WantedBy=sway-session.target
|
|||
|
||||
### mako
|
||||
|
||||
```
|
||||
```ini
|
||||
[Unit]
|
||||
Description=A lightweight Wayland notification daemon
|
||||
Documentation=man:mako(1)
|
||||
|
|
Loading…
Reference in a new issue