commit 5adb34baf37f59f5ccad671f3e0d8b838b94c88a Author: josephsmendoza Date: Fri Jun 16 05:06:09 2023 -0700 initial commit diff --git a/.local/share/applications/gamescope-session-nested.desktop b/.local/share/applications/gamescope-session-nested.desktop new file mode 100644 index 0000000..87f0cb2 --- /dev/null +++ b/.local/share/applications/gamescope-session-nested.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Comment=Start Steam in a GameScope session with all Steam Deck features enabled +Exec=bash ~/.local/share/gamescope-session-nested/gamescope-session-nested.sh +Icon=steam +Name=Steam GameScope +Type=Application +Categories=Game; \ No newline at end of file diff --git a/.local/share/gamescope-session-nested/gamescope b/.local/share/gamescope-session-nested/gamescope new file mode 100644 index 0000000..33c41b9 --- /dev/null +++ b/.local/share/gamescope-session-nested/gamescope @@ -0,0 +1,3 @@ +#!/bin/bash +echo "gamescope call intercepted, adding fullscreen flag" +$GAMESCOPE -f "$@" \ No newline at end of file diff --git a/.local/share/gamescope-session-nested/gamescope-session-nested.sh b/.local/share/gamescope-session-nested/gamescope-session-nested.sh new file mode 100644 index 0000000..75874af --- /dev/null +++ b/.local/share/gamescope-session-nested/gamescope-session-nested.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -xeuo pipefail + +systemd-run --user --pty --pipe \ + --setenv GAMESCOPE="$(which gamescope)" \ + --setenv PATH="~/.local/share/gamescope-session-nested:$PATH" \ + gamescope-session + +systemd-run --user steam -silent \ No newline at end of file diff --git a/LICENCE.md b/LICENCE.md new file mode 100644 index 0000000..6722b84 --- /dev/null +++ b/LICENCE.md @@ -0,0 +1,25 @@ +The MIT License (MIT) +===================== + +Copyright © `` `` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f5989d --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Nested Gamescope Session from Desktop +This is a simple wrapper around the `gamescope-session` script present in SteamOS 3, ChimeraOS, and the `gamescope-session-git` AUR package. This package adds an application menu entry that allows you to use the gamescope session from your desktop, enabling you to do things like record your session using software like OBS without losing any gamescope session features. +## Install +Steam Deck users can download the [quickstart file](https://sugoidogo.github.io/gamescope-session-nested/gsn-installer.desktop) and double-click it from the file manager to start the install. + +Desktop users can run the following command in a terminal: +```bash +curl https://sugoidogo.github.io/gamescope-session-nested/gsn-installer.sh | bash +``` +## Usage Notes +The "Switch to desktop" button will not simply exit the gamescope session. On the steam deck, it starts a whole new desktop session and drops you in, causing you to lose any other open programs. + +To exit cleanly, enable "developer mode" in the system settings inside the gamescope session, so that the "Restart Steam" option appears in the power menu. Steam will shutdown normally, and the wrapper script will start up desktop steam for you. \ No newline at end of file