summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorteknsl2022-01-08 23:31:28 +0100
committerteknsl2022-01-08 23:31:28 +0100
commit6e82d78fc28c5d76ce12eb10e2dac1136d9230ed (patch)
tree18f112954104e819e16c0e394b5860a9236539fa
downloadaur-6e82d78fc28c5d76ce12eb10e2dac1136d9230ed.tar.gz
init improved
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD17
-rwxr-xr-xalacritty-xwayland-patch5
-rw-r--r--alacritty-xwayland.hook18
4 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..372e81f9d567
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = alacritty-xwayland
+ pkgdesc = run alacritty with xwayland (#4739)
+ pkgver = 1.0.0
+ pkgrel = 0
+ url = https://github.com/alacritty/alacritty/issues/4739
+ arch = any
+ depends = alacritty
+ depends = sed
+ source = alacritty-xwayland.hook
+ source = alacritty-xwayland-patch
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = alacritty-xwayland
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d7d6b8809711
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Mats Bakke <teknsl.mbk@protonmail.com>
+
+pkgname='alacritty-xwayland'
+pkgdesc='run alacritty with xwayland (#4739)'
+pkgver='1.0.0'
+pkgrel='0'
+arch=('any')
+url='https://github.com/alacritty/alacritty/issues/4739'
+depends=('alacritty' 'sed')
+source=('alacritty-xwayland.hook' 'alacritty-xwayland-patch')
+md5sums=('SKIP' 'SKIP')
+
+package() {
+ install -Dm644 alacritty-xwayland.hook "$pkgdir/usr/share/libalpm/hooks"
+ install -Dm755 alacritty-xwayland-patch "$pkgdir/usr/share/libalpm/scripts"
+}
+
diff --git a/alacritty-xwayland-patch b/alacritty-xwayland-patch
new file mode 100755
index 000000000000..11d9e9d3bc0d
--- /dev/null
+++ b/alacritty-xwayland-patch
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+path="/usr/share/applications/Alacritty.desktop"
+sed -i "s|^Exec=|Exec=env WAYLAND_DISPLAY= |" $path
+
diff --git a/alacritty-xwayland.hook b/alacritty-xwayland.hook
new file mode 100644
index 000000000000..54a1ec665c2a
--- /dev/null
+++ b/alacritty-xwayland.hook
@@ -0,0 +1,18 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Target = /usr/share/applications/alacritty.desktop
+Type = Path
+
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Target = alacritty
+Type = Package
+
+[Action]
+Description = [alacritty-xwayland] Patching alacritty.desktop...
+Exec = /usr/share/libalpm/scripts/alacritty-xwayland-patch
+When = PostTransaction
+NeedsTargets
+