summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Rinne2021-01-04 07:18:33 +0200
committerJouni Rinne2021-01-04 07:18:33 +0200
commitfb6a158b965d1426e72f1968684f2d1d538ef17e (patch)
treeebb2cd0fda53ca05e1c0aee5bec73eafdaaf17ed
downloadaur-fb6a158b965d1426e72f1968684f2d1d538ef17e.tar.gz
Initial commit
-rw-r--r--.SRCINFO25
-rwxr-xr-x30-gtk3-nocsd.sh22
-rw-r--r--PKGBUILD43
-rw-r--r--gtk3-nocsd-legacy-git.install7
4 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b516acfbc63
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = gtk3-nocsd-legacy-git
+ pkgdesc = A hack to disable gtk3 client side decoration (stable PCMan version)
+ pkgver = r55.82ff5a0
+ pkgrel = 1
+ url = https://github.com/PCMan/gtk3-nocsd
+ install = gtk3-nocsd-legacy-git.install
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = LGPL
+ makedepends = git
+ makedepends = gobject-introspection
+ depends = gtk3
+ conflicts = gtk3-nocsd-git
+ source = git+https://github.com/PCMan/gtk3-nocsd.git
+ source = 30-gtk3-nocsd.sh
+ source = gtk3-nocsd-legacy-git.install
+ sha256sums = SKIP
+ sha256sums = bb3e6464ed2c0238e68755a843f976ea7843fe0476ca1092205884be0c6d7ab3
+ sha256sums = 7ed485dfdeef9ea8c0c0d24fbc5e13448861f0e56c11192a5b5168db35fa9255
+
+pkgname = gtk3-nocsd-legacy-git
+
diff --git a/30-gtk3-nocsd.sh b/30-gtk3-nocsd.sh
new file mode 100755
index 00000000000..086823a86e8
--- /dev/null
+++ b/30-gtk3-nocsd.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if [ -n "${GNOME_DESKTOP_SESSION_ID-}" ]; then
+ # just in case DESKTOP_SESSION wasn't properly set
+ _check=gnome
+else
+ _check="${DESKTOP_SESSION-}"
+fi
+
+case "${_check}" in
+
+ gnome|gnome-*|*/gnome|*/gnome-*)
+ unset GTK_CSD
+ ;;
+
+ *)
+ export GTK_CSD=0
+ export LD_PRELOAD="/usr/\${LIB}/libgtk3-nocsd.so.0${LD_PRELOAD:+:$LD_PRELOAD}"
+ ;;
+esac
+
+unset _check
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f47e6c364dc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Jouni Rinne <l33tmmx swirlything gmail dot com>
+# Contributor: Callum Parsey <neoninteger@protonmail.com>
+# Contributor: Sefa Eyeoglu <contact@scrumplex.net>
+# Contributor: Kazutoshi Noguchi <noguchi.kazutosi+lGlcOenS [at] gmail [dot] com>
+# Contributor: Marco Kundt <mrckndt [at] gmail [dot] com>
+pkgname=gtk3-nocsd-legacy-git
+pkgver=r55.82ff5a0
+pkgrel=1
+pkgdesc="A hack to disable gtk3 client side decoration (stable PCMan version)"
+arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/PCMan/gtk3-nocsd"
+license=('LGPL')
+conflicts=(gtk3-nocsd-git)
+depends=('gtk3')
+makedepends=('git' 'gobject-introspection')
+source=("git+https://github.com/PCMan/gtk3-nocsd.git"
+ "30-gtk3-nocsd.sh"
+ "gtk3-nocsd-legacy-git.install")
+sha256sums=('SKIP'
+ 'bb3e6464ed2c0238e68755a843f976ea7843fe0476ca1092205884be0c6d7ab3'
+ '7ed485dfdeef9ea8c0c0d24fbc5e13448861f0e56c11192a5b5168db35fa9255')
+install=$pkgname.install
+_gitname=gtk3-nocsd
+
+pkgver() {
+ cd ${srcdir}/${_gitname}
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd ${srcdir}/${_gitname}
+ make
+}
+
+package() {
+ cd ${srcdir}/${_gitname}
+ install -D -m 0755 gtk3-nocsd ${pkgdir}/usr/bin/gtk3-nocsd
+ install -D -m 0644 gtk3-nocsd.1 ${pkgdir}/usr/share/man/man1/gtk3-nocsd.1
+ install -D -m 0644 gtk3-nocsd.bash-completion ${pkgdir}/usr/share/bash-completion/completions/gtk3-nocsd
+ install -D -m 0644 libgtk3-nocsd.so.0 ${pkgdir}/usr/lib/libgtk3-nocsd.so.0
+ cd ${srcdir}
+ install -D -m 0755 30-gtk3-nocsd.sh ${pkgdir}/etc/X11/xinit/xinitrc.d/30-gtk3-nocsd.sh
+}
diff --git a/gtk3-nocsd-legacy-git.install b/gtk3-nocsd-legacy-git.install
new file mode 100644
index 00000000000..f354edb0ce3
--- /dev/null
+++ b/gtk3-nocsd-legacy-git.install
@@ -0,0 +1,7 @@
+function post_install {
+ echo "You need to restart your X session to apply the changes."
+}
+
+function post_upgrade {
+ post_install
+}