Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b1878d66f1 | |
|
|
740abb0571 | |
|
|
b396d533a8 | |
|
|
f9f1e1a3fc |
|
|
@ -5,6 +5,7 @@
|
|||
[submodule "modules/XRLinuxDriver"]
|
||||
path = modules/XRLinuxDriver
|
||||
url = https://github.com/wheaney/XRLinuxDriver.git
|
||||
branch = 2.4.x
|
||||
[submodule "modules/sombrero"]
|
||||
path = modules/sombrero
|
||||
url = https://github.com/wheaney/sombrero.git
|
||||
|
|
|
|||
|
|
@ -23,12 +23,22 @@ check_command "curl"
|
|||
print_missing_dependencies() {
|
||||
echo ""
|
||||
printf "\n\033[1;31mMissing required components\033[0m\n"
|
||||
if [ -n "${BREEZY_DISTROBOX:-}" ]; then
|
||||
echo ""
|
||||
printf "\033[1;33mFirst, enter your Distrobox container:\033[0m\n"
|
||||
printf "\tdistrobox enter $BREEZY_DISTROBOX\n"
|
||||
fi
|
||||
echo ""
|
||||
echo "Install the corresponding packages with your package manager, then rerun this setup:"
|
||||
echo " Debian/Ubuntu: sudo apt-get update && sudo apt-get install -y extra-cmake-modules kwin-dev libkf6config-dev libkf6configwidgets-dev libkf6coreaddons-dev libkf6kcmutils-dev libkf6globalaccel-dev libkf6i18n-dev libkf6windowsystem-dev libkf6xmlgui-dev qt6-base-dev qt6-declarative-dev libdrm-dev && (sudo apt-get install -y qml6-module-qtquick3d-helpers || true)"
|
||||
echo " Fedora/RHEL: sudo dnf install -y extra-cmake-modules kwin-devel kf6-kconfig-devel kf6-kconfigwidgets-devel kf6-kcoreaddons-devel kf6-kcmutils-devel kf6-kglobalaccel-devel kf6-ki18n-devel kf6-kwindowsystem-devel kf6-kxmlgui-devel qt6-qtbase-devel qt6-qttools-devel wayland-devel libepoxy-devel libdrm-devel"
|
||||
echo " Arch: sudo pacman -S --needed extra-cmake-modules qt6-base qt6-declarative qt6-tools qt6-quick3d kconfig kconfigwidgets kcoreaddons kglobalaccel ki18n kcmutils kxmlgui kwindowsystem kwin"
|
||||
printf "\033[1;33mInstall the missing packages\033[0m with your package manager, then rerun this setup:\n"
|
||||
printf "\tDebian/Ubuntu:\tsudo apt-get update && sudo apt-get install -y extra-cmake-modules kwin-dev libkf6config-dev libkf6configwidgets-dev libkf6coreaddons-dev libkf6kcmutils-dev libkf6globalaccel-dev libkf6i18n-dev libkf6windowsystem-dev libkf6xmlgui-dev qt6-base-dev qt6-declarative-dev libdrm-dev && (sudo apt-get install -y qml6-module-qtquick3d-helpers || true)\n"
|
||||
printf "\tFedora/RHEL:\tsudo dnf install -y cmake gc++ extra-cmake-modules kwin-devel kf6-kconfig-devel kf6-kconfigwidgets-devel kf6-kcoreaddons-devel kf6-kcmutils-devel kf6-kglobalaccel-devel kf6-ki18n-devel kf6-kwindowsystem-devel kf6-kxmlgui-devel qt6-qtbase-devel qt6-qttools-devel qt6-qtquick3d wayland-devel libepoxy-devel libdrm-devel\n"
|
||||
printf "\tArch:\t\tsudo pacman -S --needed extra-cmake-modules qt6-base qt6-declarative qt6-tools qt6-quick3d kconfig kconfigwidgets kcoreaddons kglobalaccel ki18n kcmutils kxmlgui kwindowsystem kwin\n"
|
||||
echo ""
|
||||
if [ -z "${BREEZY_DISTROBOX:-}" ]; then
|
||||
printf "\033[1;33mOn immutable distributions\033[0m (e.g. Fedora Silverblue) you can run the build inside a container.\n"
|
||||
printf "\tBREEZY_DISTROBOX=your-container-name %s\n" "$0 $*"
|
||||
echo ""
|
||||
fi
|
||||
printf "\n\033[1;33mIf you continue to see this issue\033[0m rerun as follows and attach the full output to a bug report:\n"
|
||||
printf "\n\tPRINT_FULL_STDERR=1 %s\n" "$0 $*"
|
||||
exit 1
|
||||
|
|
@ -114,13 +124,23 @@ then
|
|||
pushd $start_dir > /dev/null
|
||||
fi
|
||||
|
||||
echo "Building Breezy Desktop from source, this may take a while..."
|
||||
set +e
|
||||
pkgkwin_stderr=$(LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver 2>&1)
|
||||
pkgkwin_rc=$?
|
||||
distrobox_name="${BREEZY_DISTROBOX:-}"
|
||||
if [ -n "$distrobox_name" ]; then
|
||||
check_command "distrobox"
|
||||
echo "Building Breezy Desktop from source inside Distrobox container: $distrobox_name"
|
||||
build_dir=$(pwd)
|
||||
distrobox_shell_cmd="cd \"$build_dir\" && LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver"
|
||||
pkgkwin_stderr=$(distrobox enter --name "$distrobox_name" -- /bin/sh --noprofile --norc -lc "$distrobox_shell_cmd" 2>&1)
|
||||
pkgkwin_rc=$?
|
||||
else
|
||||
echo "Building Breezy Desktop from source, this may take a while..."
|
||||
pkgkwin_stderr=$(LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver 2>&1)
|
||||
pkgkwin_rc=$?
|
||||
fi
|
||||
set -e
|
||||
if [ "$pkgkwin_rc" -ne 0 ]; then
|
||||
if echo "$pkgkwin_stderr" | grep -qi "could not find" && [ -z "${PRINT_FULL_STDERR+x}" ]; then
|
||||
if echo "$pkgkwin_stderr" | grep -qiE 'could not find|Please install "cmake"' && [ -z "${PRINT_FULL_STDERR+x}" ]; then
|
||||
print_missing_dependencies "$*"
|
||||
else
|
||||
echo "$pkgkwin_stderr"
|
||||
|
|
|
|||
|
|
@ -46,35 +46,69 @@ DESKTOP_FILE_PATH="$XDG_DATA_HOME/applications/breezy_desktop.desktop"
|
|||
PLUGIN_SO="$LIB_HOME/qt6/plugins/kwin/effects/plugins/${EFFECT_ID}.so"
|
||||
CONFIG_SO="$LIB_HOME/qt6/plugins/plasma/kcms/${EFFECT_ID}_config.so"
|
||||
BREEZY_LIBRARY_DIR="$LIB_HOME/breezy_kwin"
|
||||
ENABLE_SCRIPT="$XDG_BIN_HOME/breezy_enable_wayland"
|
||||
DISABLE_SCRIPT="$XDG_BIN_HOME/breezy_disable_wayland"
|
||||
STEAMOS_ENABLE_DESKTOP="$XDG_DATA_HOME/applications/Enable Breezy Wayland.desktop"
|
||||
STEAMOS_DISABLE_DESKTOP="$XDG_DATA_HOME/applications/Disable Breezy Wayland.desktop"
|
||||
DESKTOP_DIR="$USER_HOME/Desktop"
|
||||
DESKTOP_ENABLE="$DESKTOP_DIR/Enable Breezy Wayland.desktop"
|
||||
DESKTOP_DISABLE="$DESKTOP_DIR/Disable Breezy Wayland.desktop"
|
||||
|
||||
if [[ -d "$EFFECT_DIR" ]]; then
|
||||
[ "$for_install" -eq 0 ] && echo "Removing $EFFECT_DIR and its contents"
|
||||
$SUDO rm -rf "$EFFECT_DIR"
|
||||
rm -rf "$EFFECT_DIR"
|
||||
fi
|
||||
|
||||
if [[ -f "$ICON_PATH" ]]; then
|
||||
[ "$for_install" -eq 0 ] && echo "Removing $ICON_PATH"
|
||||
$SUDO rm -f "$ICON_PATH"
|
||||
rm -f "$ICON_PATH"
|
||||
fi
|
||||
|
||||
if [[ -f "$DESKTOP_FILE_PATH" ]]; then
|
||||
[ "$for_install" -eq 0 ] && echo "Removing $DESKTOP_FILE_PATH"
|
||||
$SUDO rm -f "$DESKTOP_FILE_PATH"
|
||||
rm -f "$DESKTOP_FILE_PATH"
|
||||
fi
|
||||
|
||||
if [[ -f "$PLUGIN_SO" ]]; then
|
||||
[ "$for_install" -eq 0 ] && echo "Removing $PLUGIN_SO"
|
||||
$SUDO rm -f "$PLUGIN_SO"
|
||||
rm -f "$PLUGIN_SO"
|
||||
fi
|
||||
|
||||
if [[ -f "$CONFIG_SO" ]]; then
|
||||
[ "$for_install" -eq 0 ] && echo "Removing $CONFIG_SO"
|
||||
$SUDO rm -f "$CONFIG_SO"
|
||||
rm -f "$CONFIG_SO"
|
||||
fi
|
||||
|
||||
if [[ -d "$BREEZY_LIBRARY_DIR" ]]; then
|
||||
[ "$for_install" -eq 0 ] && echo "Removing $BREEZY_LIBRARY_DIR and its contents"
|
||||
$SUDO rm -rf "$BREEZY_LIBRARY_DIR"
|
||||
rm -rf "$BREEZY_LIBRARY_DIR"
|
||||
fi
|
||||
|
||||
if [[ -f "$ENABLE_SCRIPT" ]]; then
|
||||
[ "$for_install" -eq 0 ] && echo "Removing SteamOS desktop scripts"
|
||||
rm -f "$ENABLE_SCRIPT"
|
||||
fi
|
||||
|
||||
removed_wayland_disable_script=0
|
||||
if [[ -f "$DISABLE_SCRIPT" ]]; then
|
||||
rm -f "$DISABLE_SCRIPT"
|
||||
removed_wayland_disable_script=1
|
||||
fi
|
||||
|
||||
if [[ -f "$STEAMOS_ENABLE_DESKTOP" ]]; then
|
||||
rm -f "$STEAMOS_ENABLE_DESKTOP"
|
||||
fi
|
||||
|
||||
if [[ -f "$STEAMOS_DISABLE_DESKTOP" ]]; then
|
||||
rm -f "$STEAMOS_DISABLE_DESKTOP"
|
||||
fi
|
||||
|
||||
if [[ -f "$DESKTOP_ENABLE" ]]; then
|
||||
rm -f "$DESKTOP_ENABLE"
|
||||
fi
|
||||
|
||||
if [[ -f "$DESKTOP_DISABLE" ]]; then
|
||||
rm -f "$DESKTOP_DISABLE"
|
||||
fi
|
||||
|
||||
if [[ -e "$XDG_BIN_HOME/xr_driver_uninstall" && "$for_install" -eq 0 ]]; then
|
||||
|
|
@ -82,5 +116,9 @@ if [[ -e "$XDG_BIN_HOME/xr_driver_uninstall" && "$for_install" -eq 0 ]]; then
|
|||
sudo "$XDG_BIN_HOME/xr_driver_uninstall"
|
||||
fi
|
||||
|
||||
if [ "$removed_wayland_disable_script" -eq 1 ] && [ "$for_install" -eq 0 ]; then
|
||||
printf "\n\033[1;33m!!! IMPORTANT !!!\033[0m If you enabled Breezy Wayland, you MUST run \033[1;33msteamos-session-select\033[0m from a terminal in order to return to Game Mode.\n"
|
||||
fi
|
||||
|
||||
# this script is self-deleting, leave this as the last command
|
||||
rm -f $XDG_BIN_HOME/breezy_kwin_uninstall
|
||||
100
kwin/bin/setup
100
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" <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Enable Breezy Wayland
|
||||
Comment=Switch to the persistent Breezy Desktop Wayland session
|
||||
Exec=$enable_script
|
||||
Icon=com.xronlinux.BreezyDesktop
|
||||
Categories=Utility;
|
||||
Terminal=false
|
||||
StartupNotify=false
|
||||
EOF
|
||||
|
||||
cat > "$disable_desktop" <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Disable Breezy Wayland
|
||||
Comment=Return to SteamOS Game Mode session selection
|
||||
Exec=$disable_script
|
||||
Icon=com.xronlinux.BreezyDesktop
|
||||
Categories=Utility;
|
||||
Terminal=false
|
||||
StartupNotify=false
|
||||
EOF
|
||||
|
||||
chmod 644 "$enable_desktop" "$disable_desktop"
|
||||
command cp "$enable_desktop" "$desktop_enable"
|
||||
command cp "$disable_desktop" "$desktop_disable"
|
||||
chmod 755 "$desktop_enable" "$desktop_disable"
|
||||
|
||||
echo "Installed SteamOS desktop shortcuts in $applications_dir and on $desktop_dir"
|
||||
}
|
||||
|
||||
USER_HOME=$(realpath ~)
|
||||
|
||||
if [ -z "$XDG_BIN_HOME" ]; then
|
||||
|
|
@ -62,6 +160,8 @@ popd > /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"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 3bab088768849a3068146586fed60ef0cc7d506d
|
||||
Subproject commit 3b05cab0c58bc306fdc7f7019a1764bfcde545d1
|
||||
Loading…
Reference in New Issue