add chimeraos/gamescope-session support
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export SCREEN_HEIGHT="$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1) -f"
|
||||
export SCREEN_WIDTH="$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2)"
|
||||
if [ "$GAMESCOPECMD" ] ; then export GAMESCOPECMD+=" -W $SCREEN_WIDTH -H $SCREEN_HEIGHT" ; fi
|
||||
@@ -0,0 +1 @@
|
||||
nohup.out
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
echo "gamescope call intercepted, adding fullscreen flag"
|
||||
$GAMESCOPE -f "$@"
|
||||
set -x
|
||||
source ~/.config/environment.d/*.conf
|
||||
/usr/bin/gamescope -W $SCREEN_WIDTH -H $SCREEN_HEIGHT "$@"
|
||||
@@ -1,14 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xeuo pipefail
|
||||
set -x
|
||||
cd "$(dirname "$(readlink -f -- "$0")")"
|
||||
|
||||
if pgrep -x steam; then steam -shutdown; fi
|
||||
while pgrep -x steam; do sleep 1; done
|
||||
pkill -xe gamescope || true
|
||||
|
||||
systemd-run --user --pty --pipe \
|
||||
--setenv GAMESCOPE="$(which gamescope)" \
|
||||
--setenv PATH="~/.local/share/gamescope-session-nested:$PATH" \
|
||||
gamescope-session
|
||||
chimera="/usr/share/gamescope-session/gamescope-session-script"
|
||||
if [ -f "$chimera" ] ; then
|
||||
SESSIONCMD=$chimera
|
||||
else
|
||||
SESSIONCMD='gamescope-session'
|
||||
fi
|
||||
|
||||
systemd-run --user steam -silent
|
||||
systemd-run --user --pty --pipe \
|
||||
--setenv DISPLAY=$DISPLAY \
|
||||
--setenv WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
|
||||
--setenv PATH="$PWD:$PATH" \
|
||||
$SESSIONCMD
|
||||
|
||||
systemd-run --user \
|
||||
--setenv DISPLAY=$DISPLAY \
|
||||
--setenv WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
|
||||
steam -silent -nofriendsui -nochatui
|
||||
Reference in New Issue
Block a user