From fa8bcad3a6178e68698176ba6950b6ab45777380 Mon Sep 17 00:00:00 2001 From: bhaiest Date: Tue, 3 May 2022 08:57:12 +0000 Subject: [PATCH] PS2/2: Add proper session select and install kwrite --- .../etc/holoinstall/steamos-gamemode.desktop | 19 +++++++++++++++++++ .../etc/holoinstall/steamos-session-select | 11 ++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 airootfs/etc/holoinstall/steamos-gamemode.desktop mode change 100755 => 100644 airootfs/etc/holoinstall/steamos-session-select diff --git a/airootfs/etc/holoinstall/steamos-gamemode.desktop b/airootfs/etc/holoinstall/steamos-gamemode.desktop new file mode 100644 index 0000000..9c3d1f7 --- /dev/null +++ b/airootfs/etc/holoinstall/steamos-gamemode.desktop @@ -0,0 +1,19 @@ +[Desktop Entry] +Comment[en_US]= +Comment= +Exec=steamos-session-select +GenericName[en_US]= +GenericName= +Icon=steamdeck-gaming-return +MimeType= +Name[en_US]=Return to Gaming mode +Name=Return to Gaming mode +Path=/usr/bin/ +StartupNotify=true +Terminal=false +TerminalOptions= +Type=Application +X-DBUS-ServiceName= +X-DBUS-StartupType= +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/airootfs/etc/holoinstall/steamos-session-select b/airootfs/etc/holoinstall/steamos-session-select old mode 100755 new mode 100644 index 354bed9..7b94824 --- a/airootfs/etc/holoinstall/steamos-session-select +++ b/airootfs/etc/holoinstall/steamos-session-select @@ -1,3 +1,8 @@ -#!/bin/bash -exec sudo pkill -f "gamesc*" -exec loginctl terminate-session $XDG_SESSION_ID +#!/bin/zsh +if [[ "${DESKTOP_SESSION}" == "plasma" ]]; then + sudo pkexec sed -i 's/plasma/gamescope-wayland/g' /etc/sddm.conf.d/autologin.conf + sudo pkill -f "gamescope*" && sudo systemctl restart display-manager + else + sudo pkexec sed -i 's/gamescope-wayland/plasma/g' /etc/sddm.conf.d/autologin.conf + sudo systemctl restart display-manager && sudo pkexec chvt 1 && sudo pkill -f "gamescope*" +fi