diff --git a/presets/rog-ally-plasma/steam b/presets/rog-ally-plasma/steam deleted file mode 120000 index 0e1b377..0000000 --- a/presets/rog-ally-plasma/steam +++ /dev/null @@ -1 +0,0 @@ -../steam \ No newline at end of file diff --git a/presets/steam.toml b/presets/steam.toml index 583075e..d79fc5b 100644 --- a/presets/steam.toml +++ b/presets/steam.toml @@ -1,38 +1,18 @@ -packages = ["steam", "gamescope-session-git", "gamescope-plus", "wget", "vulkan-icd-loader", "lib32-vulkan-icd-loader", "vulkan-intel", "lib32-vulkan-intel", "vulkan-radeon", "lib32-vulkan-radeon", "ttf-liberation", "adobe-source-sans-pro-fonts", "adobe-source-han-sans-jp-fonts", "adobe-source-han-sans-kr-fonts", "adobe-source-han-sans-cn-fonts", "mangohud", "lib32-mangohud", "qt5-virtualkeyboard"] +packages = ["steam", "steam-deckify", "gamescope-session-git", "gamescope-plus", "wget", "vulkan-icd-loader", "lib32-vulkan-icd-loader", "vulkan-intel", "lib32-vulkan-intel", "vulkan-radeon", "lib32-vulkan-radeon", "ttf-liberation", "adobe-source-sans-pro-fonts", "adobe-source-han-sans-jp-fonts", "adobe-source-han-sans-kr-fonts", "adobe-source-han-sans-cn-fonts", "mangohud", "lib32-mangohud", "qt5-virtualkeyboard"] script = """ set -eux -wget -v https://gitlab.com/evlaV/jupiter_steam-jupiter-stable-PKGBUILD/-/raw/5cd60f3cd66527a95f93e6fefd9371fd659a5aea/steam_jupiter_stable_bootstrapped_20230316.1.tar.xz -O /usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz - -mkdir -p /etc/sddm.conf.d -echo "# Created by Manjaro ALMA" > /etc/sddm.conf.d/manjaro.conf -echo "[General]" >> /etc/sddm.conf.d/manjaro.conf -echo "DisplayServer=wayland" >> /etc/sddm.conf.d/manjaro.conf -echo "[Autologin]" >> /etc/sddm.conf.d/manjaro.conf -echo "Relogin=true" >> /etc/sddm.conf.d/manjaro.conf -echo "Session=gamescope-session.desktop" >> /etc/sddm.conf.d/manjaro.conf -echo "User=${ALMA_USER}" >> /etc/sddm.conf.d/manjaro.conf -echo "[X11]" >> /etc/sddm.conf.d/manjaro.conf -echo "# Janky workaround for wayland sessions not stopping in sddm, kills" >> /etc/sddm.conf.d/manjaro.conf -echo "# all active sddm-helper sessions on teardown" >> /etc/sddm.conf.d/manjaro.conf -echo "DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround" >> /etc/sddm.conf.d/manjaro.conf - -echo "[General]" > /etc/sddm.conf.d/virtualkbd.conf -echo "InputMethod=qtvirtualkeyboard" >> /etc/sddm.conf.d/virtualkbd.conf - -install -Dm755 /shared_dirs/steam/steamos-gamemode.desktop -t /home/${ALMA_USER}/Desktop -install -Dm644 /shared_dirs/steam/org.manjaro.host.policy -t /usr/share/polkit-1/actions -install -Dm644 /shared_dirs/steam/org.manjaro.priv.write.policy -t /usr/share/polkit-1/actions -install -Dm644 /shared_dirs/steam/org.manjaro.session.select.policy -t /usr/share/polkit-1/actions -install -Dm644 /shared_dirs/steam/steamdeck-gaming-return.svg -t /usr/share/icons/hicolor/64x64/apps -install -Dm755 /shared_dirs/steam/steamos-priv-write -t /usr/bin/steamos-polkit-helpers -install -Dm755 /shared_dirs/steam/os-session-select -t /usr/lib -install -Dm755 /shared_dirs/steam/steamos-set-hostname -t /usr/bin/steamos-polkit-helpers -install -Dm755 /shared_dirs/steam/steamos-set-timezone -t /usr/bin/steamos-polkit-helpers -install -Dm755 /shared_dirs/steam/gamescope-wayland-teardown-workaround -t /usr/bin -install -Dm755 /shared_dirs/steam/startplasma-steamos-oneshot -t /usr/bin -install -Dm755 /shared_dirs/steam/plasma-steamos-oneshot.desktop -t /usr/share/xsessions +echo "# Created by Manjaro ALMA" > /etc/sddm.conf.d/zz-steam-deckify.conf +echo "[General]" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "DisplayServer=wayland" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "[Autologin]" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "Relogin=true" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "Session=gamescope-session.desktop" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "User=${ALMA_USER}" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "[X11]" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "# Janky workaround for wayland sessions not stopping in sddm, kills" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "# all active sddm-helper sessions on teardown" >> /etc/sddm.conf.d/zz-steam-deckify.conf +echo "DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround" >> /etc/sddm.conf.d/zz-steam-deckify.conf chown -R ${ALMA_USER}:${ALMA_USER} /home/${ALMA_USER} """ environment_variables = ["ALMA_USER"] -shared_directories = ["steam"] diff --git a/presets/steam/gamescope-wayland-teardown-workaround b/presets/steam/gamescope-wayland-teardown-workaround deleted file mode 100755 index e2432ec..0000000 --- a/presets/steam/gamescope-wayland-teardown-workaround +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -eu - -TARGETS=('/bin/bash /usr/bin/gamescope-session' - '/usr/bin/kwin_x11') - -for target in "${TARGETS[@]}"; do - for processtree in $(pgrep -xf "$target" || true); do - kill -- "-$processtree" - done -done diff --git a/presets/steam/org.manjaro.host.policy b/presets/steam/org.manjaro.host.policy deleted file mode 100644 index 003e115..0000000 --- a/presets/steam/org.manjaro.host.policy +++ /dev/null @@ -1,32 +0,0 @@ - - - - - Manjaro - https://manjaro.org - - - Set the hostname - package-x-generic - - yes - yes - yes - - /usr/bin/steamos-polkit-helpers/steamos-set-hostname - - - - Set the timezone - package-x-generic - - yes - yes - yes - - /usr/bin/steamos-polkit-helpers/steamos-set-timezone - - - diff --git a/presets/steam/org.manjaro.priv.write.policy b/presets/steam/org.manjaro.priv.write.policy deleted file mode 100644 index 07d61ae..0000000 --- a/presets/steam/org.manjaro.priv.write.policy +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Manjaro - https://manjaro.org - - - Helper to write to a set of device nodes - package-x-generic - - yes - yes - yes - - /usr/bin/steamos-polkit-helpers/steamos-priv-write - - - - diff --git a/presets/steam/org.manjaro.session.select.policy b/presets/steam/org.manjaro.session.select.policy deleted file mode 100644 index 94d9f61..0000000 --- a/presets/steam/org.manjaro.session.select.policy +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Manjaro Linux - https://manjaro.org - - - Helper to switch sessions - package-x-generic - - yes - yes - yes - - /usr/lib/os-session-select - - - - diff --git a/presets/steam/os-session-select b/presets/steam/os-session-select deleted file mode 100755 index 9107c5f..0000000 --- a/presets/steam/os-session-select +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -set -e - -die() { echo >&2 "!! $*"; exit 1; } - -# FIXME Purge old files and use this one - -# File this script will modify, in addition to (potentially) the per-user sentinel file -CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf" - -SENTINEL_FILE="steamos-session-select" - -# For sanity this shipped file must be present, to ensure we're still on a normal-looking setup. -CHECK_FILE="/etc/sddm.conf.d/manjaro.conf" - -session="${1:-gamescope}" - -session_launcher="" -create_sentinel="" -session_uses_x11="" - -case "$session" in - plasma-wayland-persistent) - session_launcher="plasmawayland.desktop" - ;; - plasma-persistent) - session_launcher="plasma.desktop" - session_uses_x11=1 - ;; - plasma) - session_launcher="plasma-steamos-oneshot.desktop" - create_sentinel=1 - session_uses_x11=1 - ;; - gamescope) - session_launcher="gamescope-session.desktop" - ;; - *) - echo >&2 "!! Unrecognized session '$session'" - exit 1 - ;; -esac - -if [[ "$2" == "--sentinel-created" ]]; then - SENTINEL_CREATED=1 -fi - -# Update config sentinel -if [[ -z $SENTINEL_CREATED ]]; then - [[ -n ${HOME+x} ]] || die "No \$HOME variable" - config_dir="${XDG_CONF_DIR:-"$HOME/.config"}" - ( - cd "$HOME" - mkdir -p "$config_dir" - cd "$config_dir" - echo "$session_launcher" > "$SENTINEL_FILE" - ) - - # If we were executed as a session user and then re-execute as root below, we don't want to set root's sentinel too - export SENTINEL_CREATED=1 - echo "Updated user selected session to $session_launcher" -fi - -# Become root -if [[ $EUID != 0 ]]; then - exec pkexec "$(realpath $0)" "$session" --sentinel-created - exit 1 -fi - -{ - if [[ -n $session_uses_x11 ]]; then - # Default is Wayland - echo "[General]" - echo "DisplayServer=X11" - fi - echo "[Autologin]" - echo "Session=$session_launcher" -} > "$CONF_FILE" - -echo "Updated system autologin session to $session_launcher" -systemctl reset-failed sddm -systemctl restart sddm -echo "Restarted SDDM" diff --git a/presets/steam/plasma-steamos-oneshot.desktop b/presets/steam/plasma-steamos-oneshot.desktop deleted file mode 100644 index 79730e7..0000000 --- a/presets/steam/plasma-steamos-oneshot.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=XSession -Exec=/usr/bin/startplasma-steamos-oneshot -TryExec=/usr/bin/startplasma-steamos-oneshot -DesktopNames=KDE (One-Time Launch) -Name=Plasma (One-Time Launch) -Comment=Plasma by KDE - One Time Launch Redirect for SteamOS Sessions diff --git a/presets/steam/startplasma-steamos-oneshot b/presets/steam/startplasma-steamos-oneshot deleted file mode 100755 index c906aab..0000000 --- a/presets/steam/startplasma-steamos-oneshot +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -set -e - -die() { echo >&2 "!! $*"; exit 1; } - -SENTINEL_FILE="steamos-session-select" -SENTINEL_VALUE="plasma-steamos-oneshot.desktop" - -# If we proceed, execute this -CHAINED_SESSION="/usr/bin/startplasma-x11" -# If we decide the sentinel is consumed, execute this command instead and fail -RESTORE_SESSION=(steamos-session-select) # No arguments restores the session - -# Find or check config sentinel -check_sentinel() -{ - if [[ -z ${HOME+x} ]]; then - echo >&2 "$0: No \$HOME variable!" - # Rather than break we'll just launch plasma and hope for the best? - return 0 - fi - - local config_dir="${XDG_CONF_DIR:-"$HOME/.config"}" - ( - cd "$HOME" - cd "$config_dir" - sentinel_value="$(cat "$SENTINEL_FILE")" - [[ $sentinel_value = "$SENTINEL_VALUE" ]] || return 1 - rm "$SENTINEL_FILE" - ) || return 1 # If we couldn't read the value or it wasn't what we wanted - - # Found value and removed it, we're good to continue - return 0 -} - -if check_sentinel; then - # We found and consumed the oneshot sentinel, proceed to launch plasma - echo >&2 "$0: Found and removed sentinel file for one-shot plasma, proceeding to launch" - exec "$CHAINED_SESSION" -else - echo >&2 "$0: Sentinel value not found, executing session-select to restore session" - "${RESTORE_SESSION[@]}" || echo >&2 "$0: !! Failed to restore previous session, executing chained session" - # Session restore should've stopped us, if it is broken at least let plasma continue to open - exec "$CHAINED_SESSION" -fi diff --git a/presets/steam/steamdeck-gaming-return.svg b/presets/steam/steamdeck-gaming-return.svg deleted file mode 100644 index 8245395..0000000 --- a/presets/steam/steamdeck-gaming-return.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/presets/steam/steamos-gamemode.desktop b/presets/steam/steamos-gamemode.desktop deleted file mode 100755 index c10dced..0000000 --- a/presets/steam/steamos-gamemode.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Name=Return to Gaming Mode -Exec=qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logout -Icon=steamdeck-gaming-return -Terminal=false -Type=Application -StartupNotify=false diff --git a/presets/steam/steamos-priv-write b/presets/steam/steamos-priv-write deleted file mode 100755 index a7d30f8..0000000 --- a/presets/steam/steamos-priv-write +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -eu - -if [[ $EUID -ne 0 ]]; -then - exec pkexec --disable-internal-agent "$0" "$@" -fi - -WRITE_PATH="$1" -WRITE_VALUE="$2" - -function CommitWrite() -{ - echo "commit: $WRITE_VALUE -> $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning - chmod a+w "$WRITE_PATH" - echo "$WRITE_VALUE" > "$WRITE_PATH" - exit 0 -} - -function DeclineWrite() -{ - echo "decline: $WRITE_VALUE -> $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p err - exit 1 -} - -echo "checking: $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning -if [[ "$WRITE_PATH" == /sys/class/backlight/*/brightness ]]; then - CommitWrite -fi - -if [[ "$WRITE_PATH" == /sys/devices/*/*/*/*/hwmon/hwmon*/led_brightness ]]; then - CommitWrite -fi - -if [[ "$WRITE_PATH" == /sys/devices/*/*/*/*/hwmon/hwmon*/content_adaptive_brightness ]]; then - CommitWrite -fi - -DeclineWrite diff --git a/presets/steam/steamos-set-hostname b/presets/steam/steamos-set-hostname deleted file mode 100755 index f63e164..0000000 --- a/presets/steam/steamos-set-hostname +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -eu - -if [[ $EUID -ne 0 ]]; -then - exec pkexec --disable-internal-agent "$0" "$@" -fi - -hostnamectl set-hostname "$1" diff --git a/presets/steam/steamos-set-timezone b/presets/steam/steamos-set-timezone deleted file mode 100755 index 2811d82..0000000 --- a/presets/steam/steamos-set-timezone +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -eu - -if [[ $EUID -ne 0 ]]; -then - exec pkexec --disable-internal-agent "$0" "$@" -fi - -timedatectl set-timezone "$1" -