summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanek Thomaschewski2022-11-15 11:35:50 +0100
committerJanek Thomaschewski2022-11-15 11:35:50 +0100
commit06eed77f3247cdb2c86db0fafee26fbf977cbba8 (patch)
treed2f2c760e392ef02f64c92242948757b377b4523
downloadaur-blueberry-wayland.tar.gz
Initial upload: blueberry-wayland 1.4.8-1
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD34
-rw-r--r--wayland.patch93
3 files changed, 149 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f07de834aacb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = blueberry-wayland
+ pkgdesc = Bluetooth configuration tool - Patched systray for Wayland/AppIndicator support
+ pkgver = 1.4.8
+ pkgrel = 1
+ url = https://github.com/linuxmint/blueberry
+ arch = any
+ license = GPL
+ depends = bluez-tools
+ depends = gnome-bluetooth
+ depends = python-dbus
+ depends = python-gobject
+ depends = python-setproctitle
+ depends = rfkill
+ depends = xapps
+ provides = blueberry
+ conflicts = blueberry
+ source = https://github.com/linuxmint/blueberry/archive/1.4.8/blueberry-wayland-1.4.8.tar.gz
+ source = wayland.patch
+ sha256sums = 37a5b0bc3c7cbccee625209b9196a2e2966396cfe5c7652318559642fb6a7a32
+ sha256sums = 80edd86b6fb78a21aab128355990ceca40634c52454fae5f63bcf1953b8b2711
+
+pkgname = blueberry-wayland
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1766b436fea2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Janek Thomaschewski <janek@thomaschewski.dev>
+
+pkgname=blueberry-wayland
+_pkgname=blueberry
+provides=(blueberry)
+conflicts=(blueberry)
+pkgver=1.4.8
+pkgrel=1
+pkgdesc="Bluetooth configuration tool - Patched systray for Wayland/AppIndicator support"
+arch=(any)
+url="https://github.com/linuxmint/blueberry"
+license=(GPL)
+depends=(bluez-tools gnome-bluetooth python-dbus python-gobject python-setproctitle rfkill xapps)
+source=(
+ https://github.com/linuxmint/blueberry/archive/$pkgver/$pkgname-$pkgver.tar.gz
+ wayland.patch
+)
+sha256sums=('37a5b0bc3c7cbccee625209b9196a2e2966396cfe5c7652318559642fb6a7a32'
+ '80edd86b6fb78a21aab128355990ceca40634c52454fae5f63bcf1953b8b2711')
+
+prepare() {
+ cd $_pkgname-$pkgver
+ patch --forward --strip=1 --input="${srcdir}/wayland.patch"
+}
+
+build() {
+ cd $_pkgname-$pkgver
+ make
+}
+
+package() {
+ cd $_pkgname-$pkgver
+ cp -r etc usr "$pkgdir"
+}
diff --git a/wayland.patch b/wayland.patch
new file mode 100644
index 000000000000..8a63f39af789
--- /dev/null
+++ b/wayland.patch
@@ -0,0 +1,93 @@
+# https://github.com/linuxmint/blueberry/issues/120
+--- /usr/lib/blueberry/blueberry-tray.py.org 2021-12-13 01:02:56.923349069 -0800
++++ /usr/lib/blueberry/blueberry-tray.py 2021-12-13 02:21:23.253300141 -0800
+@@ -5,8 +5,8 @@
+ import gi
+ gi.require_version('Gtk', '3.0')
+ gi.require_version('GnomeBluetooth', '1.0')
+-gi.require_version('XApp', '1.0')
+-from gi.repository import Gtk, Gdk, GnomeBluetooth, Gio, XApp
++gi.require_version('AppIndicator3', '0.1')
++from gi.repository import AppIndicator3, Gtk, Gdk, GnomeBluetooth, Gio
+ import rfkillMagic
+ import setproctitle
+ import subprocess
+@@ -53,12 +53,16 @@
+ self.model.connect('row-deleted', self.update_icon_callback)
+ self.model.connect('row-inserted', self.update_icon_callback)
+
+- self.icon = XApp.StatusIcon()
+- self.icon.set_name("blueberry")
+- self.icon.set_tooltip_text(_("Bluetooth"))
+- self.icon.connect("activate", self.on_statusicon_activated)
+- self.icon.connect("button-release-event", self.on_statusicon_released)
+-
++ self.paired_devices = {}
++
++ self.icon = AppIndicator3.Indicator.new(
++ 'BlueBerry',
++ 'blueberry',
++ AppIndicator3.IndicatorCategory.SYSTEM_SERVICES
++ )
++ self.icon.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
++ self.icon.set_menu(self.build_menu())
++
+ self.update_icon_callback(None, None, None)
+
+ def on_settings_changed_cb(self, setting, key, data=None):
+@@ -71,21 +75,18 @@
+ return
+
+ if self.rfkill.hard_block or self.rfkill.soft_block:
+- self.icon.set_icon_name(self.tray_disabled_icon)
+- self.icon.set_tooltip_text(_("Bluetooth is disabled"))
++ self.icon.set_icon(self.tray_disabled_icon)
+ else:
+- self.icon.set_icon_name(self.tray_icon)
++ self.icon.set_icon(self.tray_icon)
+ self.update_connected_state()
+
+ def update_connected_state(self):
+ self.get_devices()
+
+ if len(self.connected_devices) > 0:
+- self.icon.set_icon_name(self.tray_active_icon)
+- self.icon.set_tooltip_text(_("Bluetooth: Connected to %s") % (", ".join(self.connected_devices)))
++ self.icon.set_icon(self.tray_active_icon)
+ else:
+- self.icon.set_icon_name(self.tray_icon)
+- self.icon.set_tooltip_text(_("Bluetooth"))
++ self.icon.set_icon(self.tray_icon)
+
+ def get_devices(self):
+ self.connected_devices = []
+@@ -117,13 +118,14 @@
+
+ iter = self.model.iter_next(iter)
+
+- def on_statusicon_activated(self, icon, button, time):
+- if button == Gdk.BUTTON_PRIMARY:
+- subprocess.Popen(["blueberry"])
++ def start_blueberry(self, _ignored):
++ subprocess.Popen(["blueberry"])
+
+- def on_statusicon_released(self, icon, x, y, button, time, position):
+- if button == 3:
++ def build_menu(self):
+ menu = Gtk.Menu()
++ blueberry_exec = Gtk.MenuItem(label=_("BlueBerry"))
++ blueberry_exec.connect("activate", self.start_blueberry)
++ menu.append(blueberry_exec)
+
+ if not self.rfkill.hard_block:
+ if self.rfkill.soft_block:
+@@ -168,7 +170,7 @@
+ menu.append(item)
+
+ menu.show_all()
+- icon.popup_menu(menu, x, y, button, time, position)
++ return menu
+
+ def toggle_connect_cb(self, item, data = None):
+ proxy = self.paired_devices[data]
+