Advance Wayland and KDE package bring-up

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-14 10:51:06 +01:00
parent 51f3c21121
commit cf12defd28
15214 changed files with 20594243 additions and 269 deletions
@@ -0,0 +1 @@
build
@@ -0,0 +1,36 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
cmake_minimum_required(VERSION 3.20)
project(quick-effect)
set(KF6_MIN_VERSION "6.0.0")
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
find_package(Qt6 CONFIG REQUIRED COMPONENTS
Core
Widgets
)
find_package(KWin REQUIRED COMPONENTS
kwin
)
kcoreaddons_add_plugin(eventlistener INSTALL_NAMESPACE "kwin/plugins")
target_sources(eventlistener PRIVATE
main.cpp
eventlistener.cpp
)
target_link_libraries(eventlistener PRIVATE
KWin::kwin
)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -0,0 +1,34 @@
/*
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "eventlistener.h"
#include "kwin/input.h"
#include "kwin/input_event.h"
#include <QDebug>
namespace KWin
{
EventListener::EventListener()
{
qDebug() << "Loaded demo event listener plugin";
input()->installInputEventSpy(this);
}
void EventListener::keyEvent(KeyEvent *event)
{
qDebug() << event;
}
void EventListener::pointerEvent(MouseEvent *event)
{
qDebug() << event;
}
} // namespace KWin
#include "moc_eventlistener.cpp"
@@ -0,0 +1,26 @@
/*
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "kwin/plugin.h"
#include "kwin/input_event_spy.h"
namespace KWin
{
class EventListener : public Plugin, public InputEventSpy
{
Q_OBJECT
public:
EventListener();
void keyEvent(KeyEvent *event) override;
void pointerEvent(MouseEvent *event) override;
};
} // namespace KWin
@@ -0,0 +1,31 @@
/*
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "eventlistener.h"
#include <KPluginFactory>
namespace KWin
{
class KWIN_EXPORT EventListenerFactory : public PluginFactory
{
Q_OBJECT
Q_PLUGIN_METADATA(IID PluginFactory_iid FILE "metadata.json")
Q_INTERFACES(KWin::PluginFactory)
public:
explicit EventListenerFactory() = default;
std::unique_ptr<Plugin> create() const override
{
return std::make_unique<EventListener>();
}
};
} // namespace KWin
#include "main.moc"
@@ -0,0 +1,5 @@
{
"KPlugin": {
"EnabledByDefault": true
}
}
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0
@@ -0,0 +1 @@
build
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
cmake_minimum_required(VERSION 3.20)
project(quick-effect)
set(KF6_MIN_VERSION "6.0.0")
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
Package
)
kpackage_install_package(package quick-effect effects kwin)
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name=""/>
<group name="">
<entry name="BackgroundColor" type="Color">
<default>#ff00ff</default>
</entry>
</group>
</kcfg>
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QuickEffectConfig</class>
<widget class="QWidget" name="QuickEffectConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>455</width>
<height>177</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Background color:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KColorButton" name="kcfg_BackgroundColor">
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorButton</class>
<extends>QPushButton</extends>
<header>kcolorbutton.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0
@@ -0,0 +1,45 @@
/*
SPDX-FileCopyrightText: 2023 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: MIT
*/
import QtQuick
import org.kde.kwin
SceneEffect {
id: effect
delegate: Rectangle {
color: effect.configuration.BackgroundColor
Text {
anchors.centerIn: parent
text: SceneView.screen.name
}
MouseArea {
anchors.fill: parent
onClicked: effect.visible = false
}
}
ScreenEdgeHandler {
enabled: true
edge: ScreenEdgeHandler.TopEdge
onActivated: effect.visible = !effect.visible
}
ShortcutHandler {
name: "Toggle Quick Effect"
text: "Toggle Quick Effect"
sequence: "Meta+Ctrl+Q"
onActivated: effect.visible = !effect.visible
}
PinchGestureHandler {
direction: PinchGestureHandler.Direction.Contracting
fingerCount: 3
onActivated: effect.visible = !effect.visible
}
}
@@ -0,0 +1,20 @@
{
"KPackageStructure": "KWin/Effect",
"KPlugin": {
"Authors": [
{
"Email": "user@example.com",
"Name": "Real Name"
}
],
"Category": "Appearance",
"Description": "Quick Effect",
"EnabledByDefault": true,
"Id": "quick-effect",
"License": "MIT",
"Name": "Quick Effect"
},
"X-KDE-ConfigModule": "kcm_kwin4_genericscripted",
"X-KDE-Ordering": 60,
"X-Plasma-API": "declarativescript"
}
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0
@@ -0,0 +1 @@
build
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
cmake_minimum_required(VERSION 3.20)
project(quick-script)
set(KF6_MIN_VERSION "6.0.0")
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
Package
)
kpackage_install_package(package quick-script scripts kwin)
@@ -0,0 +1,94 @@
/*
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: MIT
*/
import QtQuick
import QtQuick.Window
import org.kde.kirigami as Kirigami
import org.kde.kwin as KWinComponents
Window {
id: root
readonly property int thumbnailWidth: Kirigami.Units.gridUnit * 10
readonly property int thumbnailHeight: Kirigami.Units.gridUnit * 10
readonly property bool _q_showWithoutActivating: true
color: "transparent"
flags: Qt.BypassWindowManagerHint | Qt.FramelessWindowHint
visible: listModel.count > 0
width: thumbnailWidth
height: Math.min(listModel.count * thumbnailHeight, Screen.height)
x: (Screen.virtualX + Screen.width) - width
y: Screen.virtualY + 0.5 * (Screen.height - height)
ListView {
id: listView
anchors.fill: parent
model: listModel
opacity: 0.5
delegate: KWinComponents.WindowThumbnail {
client: model.window
width: thumbnailWidth
height: thumbnailHeight
TapHandler {
onTapped: KWinComponents.Workspace.activeWindow = client;
}
}
transform: Rotation {
axis {
x: 0
y: 1
z: 0
}
origin {
x: width
y: height / 2
}
angle: -30
}
}
ListModel {
id: listModel
}
function toggle() {
const window = KWinComponents.Workspace.activeWindow;
if (!window) {
return;
}
for (let i = 0; i < listModel.count; ++i) {
if (listModel.get(i)["window"] == window) {
listModel.remove(i);
return;
}
}
listModel.append({"window": window});
}
function remove(window) {
for (let i = 0; i < listModel.count; ++i) {
const item = listModel.get(i);
if (item["window"] == window) {
listModel.remove(i);
}
}
}
KWinComponents.ShortcutHandler {
name: "Toggle Current Thumbnail"
text: "Toggle Current Thumbnail"
sequence: "Meta+Ctrl+T"
onActivated: toggle()
}
Component.onCompleted: {
KWinComponents.Workspace.windowRemoved.connect(remove);
}
}
@@ -0,0 +1,18 @@
{
"KPackageStructure": "KWin/Script",
"KPlugin": {
"Authors": [
{
"Email": "user@example.com",
"Name": "Your Name"
}
],
"Description": "An example QtQuick script",
"EnabledByDefault": false,
"Icon": "preferences-system-windows-script-test",
"Id": "quick-script",
"License": "MIT",
"Name": "Quick Script"
},
"X-Plasma-API": "declarativescript"
}
@@ -0,0 +1,2 @@
SPDX-FileCopyrightText: None
SPDX-License-Identifier: CC0-1.0