diff --git a/.SRCINFO b/.SRCINFO index a79df91..8cae748 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = konsole-osc52 pkgdesc = KDE terminal emulator patched with OSC52 copy support pkgver = 23.08.1 - pkgrel = 1 + pkgrel = 2 url = https://apps.kde.org/konsole/ arch = x86_64 groups = kde-applications @@ -16,9 +16,10 @@ pkgbase = konsole-osc52 depends = kparts depends = knewstuff optdepends = keditbookmarks: to manage bookmarks + provides = konsole conflicts = konsole - source = https://download.kde.org/stable/release-service/23.08.1/src/konsole-osc52-23.08.1.tar.xz - source = https://download.kde.org/stable/release-service/23.08.1/src/konsole-osc52-23.08.1.tar.xz.sig + source = https://download.kde.org/stable/release-service/23.08.1/src/konsole-23.08.1.tar.xz + source = https://download.kde.org/stable/release-service/23.08.1/src/konsole-23.08.1.tar.xz.sig source = https://git.exozy.me/exozyme/exozyme/raw/branch/main/src/konsole.patch validpgpkeys = CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 validpgpkeys = F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87 diff --git a/PKGBUILD b/PKGBUILD index 0bce7a5..4291b8e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,9 +3,10 @@ # Contributor: Antonio Rojas # Contributor: Andrea Scarpino -pkgname=konsole-osc52 +_pkgname=konsole +pkgname=$_pkgname-osc52 pkgver=23.08.1 -pkgrel=1 +pkgrel=2 arch=(x86_64) url='https://apps.kde.org/konsole/' pkgdesc='KDE terminal emulator patched with OSC52 copy support' @@ -14,8 +15,10 @@ groups=(kde-applications kde-utilities) depends=(knotifyconfig kpty kparts knewstuff) makedepends=(extra-cmake-modules kdoctools) optdepends=('keditbookmarks: to manage bookmarks') -conflicts=(konsole) -source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig} https://git.exozy.me/exozyme/exozyme/raw/branch/main/src/konsole.patch) +provides=($_pkgname) +conflicts=($_pkgname) +source=(https://download.kde.org/stable/release-service/$pkgver/src/$_pkgname-$pkgver.tar.xz{,.sig} + $_pkgname.patch) sha256sums=('1ea81c62e150243ba178463418e6caf01bcca5bded37992b8a1bd87dffca1f4c' 'SKIP' 'e7c2ca3b30e018139a139e99141202a2efc8e4e880e2965b09537f9a97865e53') @@ -24,11 +27,11 @@ validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid prepare() { - patch -d $pkgname-$pkgver -p1 < konsole.patch + patch -d $_pkgname-$pkgver -p1 < $_pkgname.patch } build() { - cmake -B build -S $pkgname-$pkgver \ + cmake -B build -S $_pkgname-$pkgver \ -DBUILD_TESTING=OFF cmake --build build } diff --git a/konsole.patch b/konsole.patch new file mode 100644 index 0000000..934313c --- /dev/null +++ b/konsole.patch @@ -0,0 +1,57 @@ +diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp +index bebd5e399..a434ee4ab 100644 +--- a/src/Vt102Emulation.cpp ++++ b/src/Vt102Emulation.cpp +@@ -12,7 +12,9 @@ + #include + + // Qt ++#include + #include ++#include + #include + #include + #include +@@ -1147,6 +1149,29 @@ void Vt102Emulation::processSessionAttributeRequest(const int tokenSize, const u + connect(notification, &KNotification::defaultActivated, this, [this, notification]() { + _currentScreen->currentTerminalDisplay()->notificationClicked(notification->xdgActivationToken()); + }); ++ } ++ if (attribute == 52) { ++ // Clipboard ++ QStringList params = value.split(QLatin1Char(';')); ++ if (params.length() == 0) { ++ return; ++ } ++ ++ QClipboard::Mode mode; ++ if (params[0] == QLatin1Char('c')) { ++ mode = QClipboard::Clipboard; ++ } else if (params[0] == QLatin1Char('p')) { ++ mode = QClipboard::Selection; ++ } else { ++ return; ++ } ++ ++ if (params.length() == 2) { ++ // Copy to clipboard ++ QApplication::clipboard()->setText(QString::fromUtf8(QByteArray::fromBase64(params[1].toUtf8())), mode); ++ } else { ++ QApplication::clipboard()->clear(mode); ++ } + + return; + } +diff --git a/src/Vt102Emulation.h b/src/Vt102Emulation.h +index 3e067549a..a34bfc590 100644 +--- a/src/Vt102Emulation.h ++++ b/src/Vt102Emulation.h +@@ -124,7 +124,7 @@ private: + void resetModes(); + + void resetTokenizer(); +-#define MAX_TOKEN_LENGTH 256 // Max length of tokens (e.g. window title) ++#define MAX_TOKEN_LENGTH 65536 // Max length of tokens (e.g. window title) + void addToCurrentToken(uint cc); + int tokenBufferPos; +