diff options
author | nanpuyue | 2018-10-31 14:49:18 +0800 |
---|---|---|
committer | nanpuyue | 2018-10-31 14:49:18 +0800 |
commit | cfa567aebfe9549e140714c1e120d9016eb974c2 (patch) | |
tree | 9ef6fc6a4b69ac3fb3ab0c324c1b0d87bc8b091d | |
download | aur-cfa567aebfe9549e140714c1e120d9016eb974c2.tar.gz |
fcitx-qimpanel 2.1.3
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | fcitx-qimpanel-autostart | 15 | ||||
-rw-r--r-- | fcitx-qimpanel-autostart.desktop | 15 | ||||
-rw-r--r-- | replace-system-tray-icon.patch | 24 |
5 files changed, 116 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..059832c469e7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = fcitx-qimpanel + pkgdesc = An input method frontend for fcitx. It's a standalone application written in Qt/QML. + pkgver = 2.1.3 + pkgrel = 1 + url = https://github.com/lmq3342xja/fcitx-qimpanel + arch = x86_64 + license = GPL3 + makedepends = cmake + makedepends = gettext + depends = fcitx + depends = qt4 + source = fcitx-qimpanel-2.1.3.tar.gz::https://github.com/lmq3342xja/fcitx-qimpanel/archive/fcitx-qimpanel-2.1.3.tar.gz + source = replace-system-tray-icon.patch + source = fcitx-qimpanel-autostart + source = fcitx-qimpanel-autostart.desktop + sha256sums = 31f1fa8ce1a28d55d6131364d8eb8951715c2c4c853c16ae3c156fcd598a5b76 + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = fcitx-qimpanel + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..67eff71cd2ea --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: nanpuyue <nanpuyue@gmail.com> + +pkgname=fcitx-qimpanel +pkgver=2.1.3 +_tagname=$pkgname-$pkgver +pkgrel=1 +pkgdesc="An input method frontend for fcitx. It's a standalone application written in Qt/QML." +arch=('x86_64') +url="https://github.com/lmq3342xja/fcitx-qimpanel" +license=('GPL3') +depends=('fcitx' 'qt4') +makedepends=('cmake' 'gettext') +source=("$pkgname-$pkgver.tar.gz::$url/archive/$_tagname.tar.gz" + 'replace-system-tray-icon.patch' + 'fcitx-qimpanel-autostart' + 'fcitx-qimpanel-autostart.desktop') +sha256sums=('31f1fa8ce1a28d55d6131364d8eb8951715c2c4c853c16ae3c156fcd598a5b76' 'SKIP' 'SKIP' 'SKIP') + +prepare() { + mkdir -p build + cd $pkgname-$_tagname + patch -Np1 -i "$srcdir/replace-system-tray-icon.patch" +} + +build() { + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DVERSION=$pkgver \ + ../$pkgname-$_tagname + make +} + +package() { + make -C build DESTDIR="$pkgdir" install + install -d "$pkgdir/usr/bin" "$pkgdir/etc/xdg/autostart" + install -m755 fcitx-qimpanel-autostart "$pkgdir/usr/bin" + install -m644 fcitx-qimpanel-autostart.desktop "$pkgdir/etc/xdg/autostart" +} diff --git a/fcitx-qimpanel-autostart b/fcitx-qimpanel-autostart new file mode 100644 index 000000000000..4a1e81e27866 --- /dev/null +++ b/fcitx-qimpanel-autostart @@ -0,0 +1,15 @@ +#!/bin/sh + +# sleep for a little while to avoid duplicate startup +sleep 3 + +# Test whether fcitx is running correctly with dbus... +fcitx-remote > /dev/null 2>&1 + +if [ $? = "1" ]; then + echo "Fcitx seems is not running" + exit 0 +else + echo "Fcitx is running correctly." + exec fcitx-qimpanel +fi diff --git a/fcitx-qimpanel-autostart.desktop b/fcitx-qimpanel-autostart.desktop new file mode 100644 index 000000000000..63e197a3eda7 --- /dev/null +++ b/fcitx-qimpanel-autostart.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Name=Fcitx Qt IMPanel +GenericName=Fcitx Qt Input Method Panel +Comment=Start Fcitx Qt IMPanel +Exec=fcitx-qimpanel-autostart +Icon=fcitx +Terminal=false +Type=Application +Categories=System;Utility; +StartupNotify=false +X-GNOME-Autostart-Phase=Applications +X-GNOME-AutoRestart=false +X-GNOME-Autostart-Notify=false +X-KDE-autostart-after=panel +X-KDE-StartupNotify=false diff --git a/replace-system-tray-icon.patch b/replace-system-tray-icon.patch new file mode 100644 index 000000000000..4d5e4970b90a --- /dev/null +++ b/replace-system-tray-icon.patch @@ -0,0 +1,24 @@ +author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com +license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt +date: 2018-10-28 +--- a/main_controller.cpp ++++ b/main_controller.cpp +@@ -134,7 +134,7 @@ void MainController::init() + #endif + + mAgent = new PanelAgent(this); +- mSystemTray = new QSystemTrayIcon(QIcon::fromTheme("fcitx"), this); ++ mSystemTray = new QSystemTrayIcon(QIcon::fromTheme("fcitx-kbd"), this); + mTrayMenu = new SystemTrayMenu(mAgent); + + mAgent->created(); +@@ -274,7 +274,7 @@ void MainController::setSkinName(QString skinName) + void MainController::updateProperty(const KimpanelProperty &prop) + { + if (gettext("No input window") == prop.label) { +- QIcon icon = QIcon::fromTheme("fcitx"); ++ QIcon icon = QIcon::fromTheme("fcitx-kbd"); + mSystemTray->setIcon(icon); + return; + } + |