Skip to content

Commit

Permalink
Move Aurora Client code here
Browse files Browse the repository at this point in the history
It's not really needed as a standalone library, since it's only used
here.

Closes: #228
  • Loading branch information
plfiorini committed Dec 13, 2023
1 parent 409ffe7 commit 8c16f03
Show file tree
Hide file tree
Showing 37 changed files with 2,514 additions and 90 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ find_package(Qt5 "${QT_MIN_VERSION}"
Xml
Sql
Gui
WaylandClient
Widgets
Svg
Qml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ The following modules and their dependencies are required:
* [qtaccountsservice](https://github.com/lirios/qtaccountsservice) >= 1.2.0
* [qtgsettings](https://github.com/lirios/qtgsettings) >= 1.1.0
* [libliri](https://github.com/lirios/libliri)
* [aurora-scanner](https://github.com/lirios/aurora-scanner)
* [aurora-compositor](https://github.com/lirios/aurora-compositor)
* [aurora-client](https://github.com/lirios/aurora-client)
* [pam](http://www.linux-pam.org/)
* [polkit-qt5](https://invent.kde.org/libraries/polkit-qt-1)
* [solid](https://invent.kde.org/frameworks/solid)
Expand Down
5 changes: 0 additions & 5 deletions src/helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ if(FEATURE_enable_systemd)
find_package(Libsystemd REQUIRED)
endif()

if(NOT TARGET Liri::AuroraClient)
find_package(Liri1AuroraClient REQUIRED)
endif()

find_package(PAM REQUIRED)

include(LiriCreateGitHeadRevisionFile)
Expand All @@ -33,7 +29,6 @@ liri_add_executable(LiriShellHelper
Qt5::Gui
Qt5::GuiPrivate
Qt5::Qml
Liri::AuroraClient
${PAM_LIBRARIES}
)

Expand Down
16 changes: 8 additions & 8 deletions src/helper/qml/AuthDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import QtQuick.Window 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import Aurora.Client 1.0 as AuroraClient
import Liri.Shell 1.0 as Shell
import Fluid.Controls 1.0 as FluidControls

Window {
Expand All @@ -26,13 +26,13 @@ Window {
color: "transparent"
visible: false

AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.TopLayer
anchors: AuroraClient.WlrLayerSurfaceV1.LeftAnchor |
AuroraClient.WlrLayerSurfaceV1.TopAnchor |
AuroraClient.WlrLayerSurfaceV1.RightAnchor |
AuroraClient.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
Shell.WlrLayerSurfaceV1 {
layer: Shell.WlrLayerSurfaceV1.TopLayer
anchors: Shell.WlrLayerSurfaceV1.LeftAnchor |
Shell.WlrLayerSurfaceV1.TopAnchor |
Shell.WlrLayerSurfaceV1.RightAnchor |
Shell.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: Shell.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
exclusiveZone: -1
role: "auth-dialog"
}
Expand Down
19 changes: 9 additions & 10 deletions src/helper/qml/BackgroundWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import QtGSettings 1.0 as Settings
import Fluid.Effects 1.0 as FluidEffects
import Aurora.Client 1.0 as AuroraClient
import Liri.Shell 1.0 as LS
import Liri.DBusService 1.0 as DBusService
import Liri.Shell 1.0 as Shell

Window {
id: bgWindow

color: Material.color(Material.Grey, Material.Shade700)
visible: true

AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.BackgroundLayer
anchors: AuroraClient.WlrLayerSurfaceV1.TopAnchor |
AuroraClient.WlrLayerSurfaceV1.BottomAnchor |
AuroraClient.WlrLayerSurfaceV1.LeftAnchor |
AuroraClient.WlrLayerSurfaceV1.RightAnchor
keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.NoKeyboardInteractivity
Shell.WlrLayerSurfaceV1 {
layer: Shell.WlrLayerSurfaceV1.BackgroundLayer
anchors: Shell.WlrLayerSurfaceV1.TopAnchor |
Shell.WlrLayerSurfaceV1.BottomAnchor |
Shell.WlrLayerSurfaceV1.LeftAnchor |
Shell.WlrLayerSurfaceV1.RightAnchor
keyboardInteractivity: Shell.WlrLayerSurfaceV1.NoKeyboardInteractivity
exclusiveZone: -1
role: "background"
}
Expand Down Expand Up @@ -64,7 +63,7 @@ Window {
}
}

LS.Background {
Shell.Background {
id: background

anchors.fill: parent
Expand Down
8 changes: 4 additions & 4 deletions src/helper/qml/KeyBindings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import QtQuick 2.15
import QtGSettings 1.0 as Settings
import Fluid.Core 1.0 as FluidCore
import Aurora.Client 1.0 as AuroraClient
import Liri.Shell 1.0 as Shell

FluidCore.Object {
Settings.GSettings {
Expand Down Expand Up @@ -33,7 +33,7 @@ FluidCore.Object {
* Window Manager
*/

AuroraClient.LiriShortcutV1 {
Shell.LiriShortcutV1 {
sequence: wmKeybindings.mainMenu
onActivated: {
panelWindow;
Expand All @@ -44,7 +44,7 @@ FluidCore.Object {
* Session Manager
*/

AuroraClient.LiriShortcutV1 {
Shell.LiriShortcutV1 {
sequence: smKeybindings.powerOff
onActivated: {
powerOffDialog.show();
Expand All @@ -55,7 +55,7 @@ FluidCore.Object {
* Desktop
*/

AuroraClient.LiriShortcutV1 {
Shell.LiriShortcutV1 {
sequence: desktopKeybindings.runCommand
onActivated: {
runDialog.show();
Expand Down
16 changes: 8 additions & 8 deletions src/helper/qml/LogoutDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import QtQuick.Window 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import Aurora.Client 1.0 as AuroraClient
import Fluid.Controls 1.0 as FluidControls
import Liri.Shell 1.0 as Shell

Window {
id: logoutDialogWindow
Expand All @@ -20,13 +20,13 @@ Window {
color: "transparent"
visible: false

AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.TopLayer
anchors: AuroraClient.WlrLayerSurfaceV1.LeftAnchor |
AuroraClient.WlrLayerSurfaceV1.TopAnchor |
AuroraClient.WlrLayerSurfaceV1.RightAnchor |
AuroraClient.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
Shell.WlrLayerSurfaceV1 {
layer: Shell.WlrLayerSurfaceV1.TopLayer
anchors: Shell.WlrLayerSurfaceV1.LeftAnchor |
Shell.WlrLayerSurfaceV1.TopAnchor |
Shell.WlrLayerSurfaceV1.RightAnchor |
Shell.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: Shell.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
exclusiveZone: -1
role: "logout-dialog"
}
Expand Down
8 changes: 4 additions & 4 deletions src/helper/qml/OsdWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import QtQuick.Window 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import Aurora.Client 1.0 as AuroraClient
import Fluid.Controls 1.0 as FluidControls
import Fluid.Effects 1.0 as FluidEffects
import Liri.Shell 1.0 as Shell

Window {
id: osdWindow
Expand All @@ -26,9 +26,9 @@ Window {
color: "transparent"
visible: true

AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.OverlayLayer
keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.NoKeyboardInteractivity
Shell.WlrLayerSurfaceV1 {
layer: Shell.WlrLayerSurfaceV1.OverlayLayer
keyboardInteractivity: Shell.WlrLayerSurfaceV1.NoKeyboardInteractivity
role: "osd"
}

Expand Down
16 changes: 8 additions & 8 deletions src/helper/qml/PowerOffDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import QtQuick.Window 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import Aurora.Client 1.0 as AuroraClient
import Fluid.Controls 1.0 as FluidControls
import Liri.Device 1.0 as LiriDevice
import Liri.Shell 1.0 as Shell

Window {
id: powerOffDialogWindow
Expand All @@ -22,13 +22,13 @@ Window {
color: "transparent"
visible: false

AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.TopLayer
anchors: AuroraClient.WlrLayerSurfaceV1.LeftAnchor |
AuroraClient.WlrLayerSurfaceV1.TopAnchor |
AuroraClient.WlrLayerSurfaceV1.RightAnchor |
AuroraClient.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
Shell.WlrLayerSurfaceV1 {
layer: Shell.WlrLayerSurfaceV1.TopLayer
anchors: Shell.WlrLayerSurfaceV1.LeftAnchor |
Shell.WlrLayerSurfaceV1.TopAnchor |
Shell.WlrLayerSurfaceV1.RightAnchor |
Shell.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: Shell.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
exclusiveZone: -1
role: "poweroff-dialog"
}
Expand Down
16 changes: 8 additions & 8 deletions src/helper/qml/RunDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import QtQuick.Window 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import Aurora.Client 1.0 as AuroraClient
import Fluid.Controls 1.0 as FluidControls
import Liri.Shell 1.0 as Shell
import Liri.Session 1.0 as Session

Window {
Expand All @@ -17,13 +17,13 @@ Window {
color: "transparent"
visible: false

AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.TopLayer
anchors: AuroraClient.WlrLayerSurfaceV1.LeftAnchor |
AuroraClient.WlrLayerSurfaceV1.TopAnchor |
AuroraClient.WlrLayerSurfaceV1.RightAnchor |
AuroraClient.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
Shell.WlrLayerSurfaceV1 {
layer: Shell.WlrLayerSurfaceV1.TopLayer
anchors: Shell.WlrLayerSurfaceV1.LeftAnchor |
Shell.WlrLayerSurfaceV1.TopAnchor |
Shell.WlrLayerSurfaceV1.RightAnchor |
Shell.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: Shell.WlrLayerSurfaceV1.ExclusiveKeyboardInteractivity
exclusiveZone: -1
role: "run-dialog"
}
Expand Down
16 changes: 8 additions & 8 deletions src/helper/qml/TopLayerWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import Aurora.Client 1.0 as AuroraClient
import Fluid.Controls 1.0 as FluidControls
import Liri.Shell 1.0 as Shell
import Liri.Shell.TaskManager 1.0 as TaskManager
import Liri.Shell.Notifications 1.0 as NotificationServer
import "panel" as Panel
Expand All @@ -30,13 +30,13 @@ Window {
panel.hide();
}

AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.TopLayer
anchors: AuroraClient.WlrLayerSurfaceV1.LeftAnchor |
AuroraClient.WlrLayerSurfaceV1.TopAnchor |
AuroraClient.WlrLayerSurfaceV1.RightAnchor |
AuroraClient.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.OnDemandKeyboardInteractivity
Shell.WlrLayerSurfaceV1 {
layer: Shell.WlrLayerSurfaceV1.TopLayer
anchors: Shell.WlrLayerSurfaceV1.LeftAnchor |
Shell.WlrLayerSurfaceV1.TopAnchor |
Shell.WlrLayerSurfaceV1.RightAnchor |
Shell.WlrLayerSurfaceV1.BottomAnchor
keyboardInteractivity: Shell.WlrLayerSurfaceV1.OnDemandKeyboardInteractivity
exclusiveZone: -1
role: "toplayer"
}
Expand Down
6 changes: 3 additions & 3 deletions src/helper/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QtQml 2.1
import QtQuick 2.15
import QtQuick.Window 2.15
import QtGSettings 1.0 as Settings
import Aurora.Client 1.0 as AuroraClient
import Liri.Shell 1.0 as Shell
import Liri.Session 1.0 as Session
import Liri.PolicyKit 1.0 as Polkit

Expand Down Expand Up @@ -56,7 +56,7 @@ Item {
* Shell
*/

AuroraClient.LiriShellV1 {
Shell.LiriShellV1 {
id: shell

onActiveChanged: {
Expand Down Expand Up @@ -87,7 +87,7 @@ Item {
OsdWindow {}
}

AuroraClient.LiriOsdV1 {
Shell.LiriOsdV1 {
property OsdWindow osdWindow: null

onTextRequested: {
Expand Down
1 change: 0 additions & 1 deletion src/helper/qml/panel/Panel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import Fluid.Controls 1.0 as FluidControls
import Aurora.Client 1.0 as AuroraClient
import Liri.Shell 1.0 as Shell

Rectangle {
Expand Down
25 changes: 21 additions & 4 deletions src/imports/shell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ liri_add_qml_plugin(ShellQmlPlugin
"shellplugin"
SOURCES
extensionsmodel.cpp extensionsmodel.h
multimediakeysclient.cpp
multimediakeysclient.h
osdclient.cpp
osdclient.h
lirishellv1.cpp lirishellv1.h lirishellv1_p.h
multimediakeysclient.cpp multimediakeysclient.h
osdclient.cpp osdclient.h
plugin.cpp
wlrlayersurfacev1.cpp wlrlayersurfacev1.h wlrlayersurfacev1_p.h
QML_FILES
Background.qml
Indicator.qml
Expand All @@ -27,6 +27,23 @@ liri_add_qml_plugin(ShellQmlPlugin
Qt5::Core
Qt5::Concurrent
Qt5::DBus
Qt5::Gui
Qt5::GuiPrivate
Qt5::WaylandClient
)

ecm_qt_declare_logging_category(
ShellQmlPlugin
HEADER "lirishellclientlogging.h"
IDENTIFIER "gLcShellClient"
CATEGORY_NAME "liri.shell.client"
DEFAULT_SEVERITY "Info"
)

aurora_generate_wayland_protocol_client_sources(ShellQmlPlugin
FILES
liri-shell-unstable-v1.xml
wlr-layer-shell-unstable-v1.xml
)

liri_finalize_qml_plugin(ShellQmlPlugin)
Loading

0 comments on commit 8c16f03

Please sign in to comment.