You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.3 KiB

  1. [Unit]
  2. Description=Sway Window Manager
  3. Documentation=
  4. # Make sure we are started after logins are permitted.
  5. After=systemd-user-sessions.service
  6. # If Plymouth is used, we want to start when it is on its way out.
  7. After=plymouth-quit-wait.service
  8. # D-Bus is necessary for contacting logind. Logind is required.
  9. Wants=dbus.socket
  10. After=dbus.socket
  11. # This scope is created by pam_systemd when logging in as the user.
  12. # This directive is a workaround to a systemd bug, where the setup of the
  13. # user session by PAM has some race condition, possibly leading to a failure.
  14. # See README for more details.
  15. After=session-c1.scope
  16. # Since we are part of the graphical session, make sure we are started before
  17. # it is complete.
  18. Before=graphical.target
  19. # Prevent starting on systems without virtual consoles
  20. ConditionPathExists=/dev/tty0
  21. [Service]
  22. ExecStart=/usr/bin/sway
  23. EnvironmentFile=/etc/systemd/system/sway.env
  24. TimeoutStartSec=30
  25. User=1000
  26. PAMName=login
  27. WorkingDirectory=~
  28. Restart=on-failure
  29. RestartSec=5s
  30. # A virtual terminal is needed.
  31. TTYPath=/dev/tty7
  32. TTYReset=yes
  33. TTYVHangup=yes
  34. TTYVTDisallocate=yes
  35. # Fail to start if not controlling the tty.
  36. StandardInput=tty-fail
  37. StandardOutput=journal
  38. StandardError=journal
  39. # Log this user with utmp, letting it show up with commands 'w' and 'who'.
  40. UtmpIdentifier=tty7
  41. UtmpMode=user
  42. [Install]
  43. WantedBy=graphical.target