Skip to content

Commit

Permalink
Merge pull request #213 from Pogogo007/deckpowerbutton
Browse files Browse the repository at this point in the history
Add gamescope-session-git with powerbuttond patch
  • Loading branch information
ptr1337 authored May 24, 2024
2 parents 0a6cc85 + 50caa57 commit b65efea
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
17 changes: 17 additions & 0 deletions handheld/gamescope-session-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pkgbase = gamescope-session-git
pkgdesc = Common gamescope session files
pkgver = r231.127f432
pkgrel = 1
url = https://github.com/ChimeraOS/gamescope-session
install = gamescope-session.install
arch = any
license = MIT
makedepends = git
depends = gamescope
optdepends = mangohud: for performance overlay
source = gamescope-session::git+https://github.com/ChimeraOS/gamescope-session.git
source = powerbuttond.patch
sha512sums = SKIP
sha512sums = 1fd74f3312a5315447bce7c89c2501df54af15deb9f0a96c1e0a4d2d2304b77e472d3da381b3b98e2c60f83cd72b5ddf2e4a675d5e1cf575b0f5826e876dec08

pkgname = gamescope-session-git
36 changes: 36 additions & 0 deletions handheld/gamescope-session-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Maintainer: Joaquín I. Aramendía <samsagax at gmail dot com>

pkgname=gamescope-session-git
_gitdir=gamescope-session
pkgver=r231.127f432
pkgrel=1
pkgdesc="Common gamescope session files"
arch=('any')
url="https://github.com/ChimeraOS/gamescope-session"
license=('MIT')
groups=()
depends=('gamescope')
makedepends=('git')
optdepends=('mangohud: for performance overlay')
install=gamescope-session.install
source=("${_gitdir}::git+https://github.com/ChimeraOS/${_gitdir}.git"
"powerbuttond.patch")
sha512sums=('SKIP'
'1fd74f3312a5315447bce7c89c2501df54af15deb9f0a96c1e0a4d2d2304b77e472d3da381b3b98e2c60f83cd72b5ddf2e4a675d5e1cf575b0f5826e876dec08')

pkgver() {
cd "$srcdir/${_gitdir}"

# Git, no tags available
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
patch --directory=$_gitdir --forward --strip=1 --input=../powerbuttond.patch
}

package() {
cd "$srcdir/${_gitdir}"
cp -rv "${srcdir}/${_gitdir}/usr" "${pkgdir}/usr"
install -Dm644 "${srcdir}/${_gitdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
7 changes: 7 additions & 0 deletions handheld/gamescope-session-git/gamescope-session.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
post_install() {
setcap 'cap_sys_nice=eip' /usr/bin/gamescope
}

post_upgrade() {
post_install
}
28 changes: 28 additions & 0 deletions handheld/gamescope-session-git/powerbuttond.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 20e94d57eb0821719c4455affc7af5e31eae60b5 Mon Sep 17 00:00:00 2001
From: Nekoh <[email protected]>
Date: Thu, 23 May 2024 19:29:23 -0400
Subject: [PATCH] Add powerbuttond for galileo and jupiter

---
usr/share/gamescope-session-plus/gamescope-session-plus | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/usr/share/gamescope-session-plus/gamescope-session-plus b/usr/share/gamescope-session-plus/gamescope-session-plus
index 00ba821..4d3673c 100755
--- a/usr/share/gamescope-session-plus/gamescope-session-plus
+++ b/usr/share/gamescope-session-plus/gamescope-session-plus
@@ -252,6 +252,14 @@ if command -v /usr/bin/ibus-daemon >/dev/null; then
/usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable
fi

+#Use powerbuttond on galileo/jupiter only
+SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
+if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then
+ (while true; do
+ /usr/lib/hwsupport/powerbuttond
+ done) &
+fi
+
# If we have mangoapp binary start it
if command -v mangoapp >/dev/null; then
(while true; do

0 comments on commit b65efea

Please sign in to comment.