mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Add systemd user session
This commit is contained in:
parent
f8ae17356a
commit
ed58eec61b
5 changed files with 83 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ Requires: greenisland
|
|||
Requires: plasma-workspace
|
||||
Requires: breeze-icon-theme
|
||||
Requires: oxygen-fonts
|
||||
Requires: frameworkintegration
|
||||
BuildRequires: pkgconfig(Qt5Core)
|
||||
BuildRequires: pkgconfig(Qt5DBus)
|
||||
BuildRequires: pkgconfig(Qt5Xml)
|
||||
|
|
@ -62,6 +63,25 @@ rm -rf %{buildroot}
|
|||
# << install pre
|
||||
|
||||
# >> install post
|
||||
|
||||
# File with environment variables, used by systemd units
|
||||
mkdir -p %{buildroot}%{_sharedstatedir}/environment/plasma-phone/plasma-phone.conf <<EOF
|
||||
LIBEXEC_PATH="%{_libexecdir}:%{_libdir}/libexec:%{_kf5_libexecdir}"
|
||||
QT_QPA_PLATFORM=wayland
|
||||
QT_QPA_PLATFORMTHEME=KDE
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
XDG_CURRENT_DESKTOP=KDE
|
||||
KSCREEN_BACKEND=QScreen
|
||||
EOF
|
||||
|
||||
# Install systemd units
|
||||
install -D -m 644 services/plasma-phone-compositor.service %{buildroot}%{_libdir}/systemd/user/plasma-phone-compositor.service
|
||||
install -D -m 644 services/plasma-phone-shell.service %{buildroot}%{_libdir}/systemd/user/plasma-phone-shell.service
|
||||
install -D -m 644 services/plasma-phone-kded5.service %{buildroot}%{_libdir}/systemd/user/plasma-phone-kded5.service
|
||||
ln -s ../plasma-phone-compositor.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/plasma-phone-compositor.service
|
||||
ln -s ../plasma-phone-shell.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/plasma-phone-shell.service
|
||||
ln -s ../plasma-phone-kded5.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/plasma-phone-kded5.service
|
||||
|
||||
# << install post
|
||||
|
||||
%files
|
||||
|
|
@ -69,5 +89,8 @@ rm -rf %{buildroot}
|
|||
%{_kf5_sharedir}/plasma/*
|
||||
%{_kf5_sharedir}/wallpapers/*
|
||||
%{_kf5_servicesdir}/*.desktop
|
||||
%{_sharedstatedir}/environment/plasma-phone/*
|
||||
%{_libdir}/systemd/user/*
|
||||
%{_libdir}/systemd/user/user-session.target.wants/*
|
||||
# >> files
|
||||
# << files
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Requires:
|
|||
- plasma-workspace
|
||||
- breeze-icon-theme
|
||||
- oxygen-fonts
|
||||
- frameworkintegration
|
||||
|
||||
PkgBR:
|
||||
- extra-cmake-modules
|
||||
|
|
@ -41,3 +42,6 @@ Files:
|
|||
- "%{_kf5_sharedir}/plasma/*"
|
||||
- "%{_kf5_sharedir}/wallpapers/*"
|
||||
- "%{_kf5_servicesdir}/*.desktop"
|
||||
- "%{_sharedstatedir}/environment/plasma-phone/*"
|
||||
- "%{_libdir}/systemd/user/*"
|
||||
- "%{_libdir}/systemd/user/user-session.target.wants/*"
|
||||
|
|
|
|||
19
services/plasma-phone-compositor.service
Normal file
19
services/plasma-phone-compositor.service
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# Copyright (C) 2014 Pier Luigi Fiorini
|
||||
#
|
||||
# Starts Green Island with the phone compositor plugin.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Green Island
|
||||
Requires=dbus.socket pre-user-session.target
|
||||
After=pre-user-session.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=-/var/lib/environment/compositor/*.conf
|
||||
ExecStart=/usr/bin/greenisland $LIPSTICK_OPTIONS -p org.kde.satellite.compositor.phone
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=user-session.target
|
||||
18
services/plasma-phone-kded5.service
Normal file
18
services/plasma-phone-kded5.service
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2014 Pier Luigi Fiorini
|
||||
#
|
||||
# Starts kded5 needed by the phone UI.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=KDED5
|
||||
Requires=dbus.socket
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=-/var/lib/environment/plasma-phone/*.conf
|
||||
ExecStart=/usr/bin/kded5
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=user-session.target
|
||||
19
services/plasma-phone-shell.service
Normal file
19
services/plasma-phone-shell.service
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# Copyright (C) 2014 Pier Luigi Fiorini
|
||||
#
|
||||
# Starts Green Island with the phone compositor plugin.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Plasma Phone UI
|
||||
Requires=dbus.socket plasma-phone-compositor.service
|
||||
After=plasma-phone-kded5.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
EnvironmentFile=-/var/lib/environment/plasma-phone/*.conf
|
||||
ExecStart=/usr/bin/plasmashell -n -p org.kde.satellite.phone
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=user-session.target
|
||||
Loading…
Reference in a new issue