mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Script that runs compositor and UI together
Brutal but works, this is meant to be used only during the prototype phase, we will figure out why the systemd unit get restarted later.
This commit is contained in:
parent
75f28daa75
commit
4b044378a8
5 changed files with 70 additions and 1 deletions
|
|
@ -38,5 +38,6 @@ plasma_install_package(look-and-feel org.kde.satellite.phone look-and-feel)
|
|||
plasma_install_package(shell org.kde.satellite.phone shells)
|
||||
install(DIRECTORY wallpaper/ DESTINATION "${WALLPAPER_INSTALL_DIR}/org.kde.satellite.lockers")
|
||||
|
||||
add_subdirectory(bin)
|
||||
add_subdirectory(qmlcomponents)
|
||||
add_subdirectory(services)
|
||||
|
|
|
|||
4
bin/CMakeLists.txt
Normal file
4
bin/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plasma-phone.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-phone)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plasma-phone
|
||||
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ WORLD_EXECUTE WORLD_READ GROUP_EXECUTE GROUP_READ
|
||||
DESTINATION ${BIN_INSTALL_DIR})
|
||||
46
bin/plasma-phone.cmake
Normal file
46
bin/plasma-phone.cmake
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Script that starts the Plasma phone UI.
|
||||
#
|
||||
# Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
|
||||
## Compositor
|
||||
|
||||
export EGL_PLATFORM=hwcomposer
|
||||
export QT_QPA_PLATFORM=hwcomposer
|
||||
export QT_QPA_EGLFS_DEPTH=32
|
||||
export QT_QPA_EGLFS_HIDECURSOR=1
|
||||
export QT_COMPOSITOR_NEGATE_INVERTED_Y=0
|
||||
export KSCREEN_BACKEND=QScreen
|
||||
|
||||
/usr/bin/greenisland -plugin evdevtouch:/dev/input/event1 -plugin evdevkeyboard:keymap=/usr/share/qt5/keymaps/droid.qmap -p org.kde.satellite.compositor.phone &
|
||||
|
||||
sleep 3
|
||||
|
||||
## UI
|
||||
|
||||
unset EGL_PLATFORM
|
||||
unset QT_QPA_PLATFORM
|
||||
unset QT_QPA_EGLFS_DEPTH
|
||||
unset QT_QPA_EGLFS_HIDECURSOR
|
||||
unset QT_COMPOSITOR_NEGATE_INVERTED_Y
|
||||
|
||||
export LIBEXEC_PATH="/usr/libexec:/usr/lib/libexec:/usr/lib/libexec/kf5"
|
||||
export QT_PLUGIN_PATH=${QT_PLUGIN_PATH+$QT_PLUGIN_PATH:}`qtpaths --plugin-dir`:/usr/lib/kde5/plugins
|
||||
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_QPA_PLATFORMTHEME=KDE
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export XDG_CURRENT_DESKTOP=KDE
|
||||
export KSCREEN_BACKEND=QScreen
|
||||
|
||||
export KDE_FULL_SESSION=1
|
||||
export KDE_SESSION_VERSION=5
|
||||
|
||||
exec /usr/bin/plasmashell -p org.kde.satellite.phone -n
|
||||
|
|
@ -125,7 +125,8 @@ EOF
|
|||
|
||||
# Install services links
|
||||
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
|
||||
UNITS="plasma-phone-compositor plasma-phone-ui"
|
||||
#UNITS="plasma-phone-compositor plasma-phone-ui"
|
||||
UNITS="plasma-phone"
|
||||
for service in $UNITS; do
|
||||
ln -sf ../${service}.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/${service}.service
|
||||
done
|
||||
|
|
|
|||
17
services/plasma-phone.service.cmake
Normal file
17
services/plasma-phone.service.cmake
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
||||
#
|
||||
# Starts Plasma shell for phones.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=Plasma Phone
|
||||
Requires=dbus.socket
|
||||
|
||||
[Service]
|
||||
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=%t/dbus/user_bus_socket
|
||||
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/plasma-phone
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=user-session.target
|
||||
Loading…
Reference in a new issue