treeland/misc/systemd/dde-session-pre.target.wants/treeland-sd.service.in

34 lines
1.2 KiB
SYSTEMD

[Unit]
Description=TreeLand socket helper service
CollectMode=inactive-or-failed
Requires=treeland.service
PartOf=treeland.service
After=treeland.service
Requires=treeland-sd.socket
PartOf=treeland-sd.socket
After=treeland-sd.socket
Requisite=dde-session-pre.target
PartOf=dde-session-pre.target
Before=dde-session-pre.target
[Service]
ExecCondition=/bin/sh -c 'test "$DDE_CURRENT_COMPOSITOR" = "TreeLand" || exit 2'
Type=notify
Sockets=treeland-sd.socket
UnsetEnvironment=DISPLAY
UnsetEnvironment=WAYLAND_DISPLAY
ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/treeland-sd --type wayland
ExecStartPost=-/usr/bin/systemctl --user set-environment WAYLAND_DISPLAY=%t/treeland.socket
ExecStartPost=-/usr/bin/systemctl --user set-environment QT_WAYLAND_RECONNECT=1
ExecStartPost=-/usr/bin/systemctl --user set-environment QT_QPA_PLATFORM=wayland
ExecStartPost=-/usr/bin/systemctl --user set-environment QT_IM_MODULE=fcitx
ExecStop=-/usr/bin/systemctl --user unset-environment WAYLAND_DISPLAY
ExecStop=-/usr/bin/systemctl --user unset-environment QT_WAYLAND_RECONNECT
ExecStop=-/usr/bin/systemctl --user unset-environment QT_QPA_PLATFORM
ExecStop=-/usr/bin/systemctl --user unset-environment QT_IM_MODULE
Slice=session.slice
RestartSec=1s