diff --git a/VERSION b/VERSION index fad066f..4fd0fe3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5.0 \ No newline at end of file +2.5.1 \ No newline at end of file diff --git a/kwin/bin/setup b/kwin/bin/setup index e7fd3b1..0307bcd 100755 --- a/kwin/bin/setup +++ b/kwin/bin/setup @@ -7,6 +7,104 @@ if [ "$XDG_SESSION_TYPE" != "wayland" ]; then printf "\033[1;33mWARNING:\033[0m Virtual display functionality requires Wayland\n" fi +install_steamos_shortcuts() { + local os_release="/etc/os-release" + if [[ ! -r "$os_release" ]]; then + return + fi + + local ID="" + local ID_LIKE="" + # shellcheck disable=SC1090 + source "$os_release" + + if [[ "$ID" != "steamos" && "$ID_LIKE" != *"steamos"* && "$ID_LIKE" != *"steamdeck"* ]]; then + return + fi + + if ! command -v steamos-session-select >/dev/null 2>&1; then + echo "Skipping SteamOS shortcuts: steamos-session-select not found" + return + fi + + local applications_dir="$HOME/.local/share/applications" + local desktop_dir="$HOME/Desktop" + local enable_script="$XDG_BIN_HOME/breezy_enable_wayland" + local disable_script="$XDG_BIN_HOME/breezy_disable_wayland" + local enable_desktop="$applications_dir/Enable Breezy Wayland.desktop" + local disable_desktop="$applications_dir/Disable Breezy Wayland.desktop" + + local desktop_enable="$desktop_dir/Enable Breezy Wayland.desktop" + local desktop_disable="$desktop_dir/Disable Breezy Wayland.desktop" + + mkdir -p "$applications_dir" "$desktop_dir" + + cat > "$enable_script" <<'EOF' +#!/usr/bin/env bash +set -e + +MESSAGE="IMPORTANT - You will be unable to return to Game Mode until you use the Disable Breezy Wayland script." + +if command -v kdialog >/dev/null 2>&1; then + if ! kdialog --warningyesno "$MESSAGE" --title "Enable Breezy Wayland" --yes-label "Enable" --no-label "Cancel"; then + exit 0 + fi +elif command -v zenity >/dev/null 2>&1; then + if ! zenity --question --title="Enable Breezy Wayland" --text="$MESSAGE" --ok-label="Enable" --cancel-label="Cancel" --no-wrap; then + exit 0 + fi +else + echo "$MESSAGE" + read -r -p "Type 'enable' to continue: " confirmation + if [[ "$confirmation" != "enable" ]]; then + exit 0 + fi +fi + +exec steamos-session-select plasma-wayland-persistent +EOF + + cat > "$disable_script" <<'EOF' +#!/usr/bin/env bash +set -e + +exec steamos-session-select +EOF + + chmod +x "$enable_script" "$disable_script" + + cat > "$enable_desktop" < "$disable_desktop" < /dev/null mkdir -p $XDG_BIN_HOME cp bin/breezy_kwin_uninstall $XDG_BIN_HOME +install_steamos_shortcuts + # Install QT_PLUGIN_PATH snippet into ~/.bash_profile if not present BASH_PROFILE="$HOME/.bash_profile" QT_PLUGIN_DIR="$HOME/.local/$QT_PLUGIN_DIR_RELATIVE" diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver index 6432928..f1e1ed9 160000 --- a/modules/XRLinuxDriver +++ b/modules/XRLinuxDriver @@ -1 +1 @@ -Subproject commit 6432928fe013298b82ce69f466cef615d3aad0dd +Subproject commit f1e1ed94860d3e6268efbff9e9bfc8c00483c3f0