Clean up setup messaging, add steamos detection to setup script
This commit is contained in:
parent
a6f9d0b9d0
commit
3e726bd1ee
|
|
@ -21,6 +21,12 @@ check_command() {
|
||||||
check_command "curl"
|
check_command "curl"
|
||||||
|
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
if [ -f /etc/os-release ]; then
|
||||||
|
. /etc/os-release
|
||||||
|
if [ "$ID" == "steamos" ]; then
|
||||||
|
ARCH="steamos"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
FILE_NAME="breezyKWin-$ARCH.tar.gz"
|
FILE_NAME="breezyKWin-$ARCH.tar.gz"
|
||||||
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/wheaney/breezy-desktop/releases/latest")
|
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/wheaney/breezy-desktop/releases/latest")
|
||||||
echo "Performing setup for KWin ($ARCH)"
|
echo "Performing setup for KWin ($ARCH)"
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ UA_EVENT_VERSION="$1"
|
||||||
tar -xf $(pwd)/breezyKWinPlugin.tar.gz
|
tar -xf $(pwd)/breezyKWinPlugin.tar.gz
|
||||||
pushd breezy_desktop/usr > /dev/null
|
pushd breezy_desktop/usr > /dev/null
|
||||||
|
|
||||||
|
echo "Copying KWin plugin files to $USER_HOME/.local/{lib,share}"
|
||||||
|
|
||||||
# locate the lib path that ends with qt6/plugins (handles multiarch dirs)
|
# locate the lib path that ends with qt6/plugins (handles multiarch dirs)
|
||||||
QT_PLUGIN_DIR_RELATIVE=$(find lib -type d -path '*/qt6/plugins' -print -quit 2>/dev/null || true)
|
QT_PLUGIN_DIR_RELATIVE=$(find lib -type d -path '*/qt6/plugins' -print -quit 2>/dev/null || true)
|
||||||
if [ -z "$QT_PLUGIN_DIR_RELATIVE" ]; then
|
if [ -z "$QT_PLUGIN_DIR_RELATIVE" ]; then
|
||||||
|
|
@ -55,7 +57,7 @@ fi
|
||||||
chmod -R 755 .
|
chmod -R 755 .
|
||||||
cp -r . "$USER_HOME/.local/"
|
cp -r . "$USER_HOME/.local/"
|
||||||
|
|
||||||
popd
|
popd > /dev/null
|
||||||
|
|
||||||
cp bin/breezy_kwin_uninstall $XDG_BIN_HOME
|
cp bin/breezy_kwin_uninstall $XDG_BIN_HOME
|
||||||
|
|
||||||
|
|
@ -64,6 +66,7 @@ BASH_PROFILE="$HOME/.bash_profile"
|
||||||
QT_PLUGIN_DIR="$HOME/.local/$QT_PLUGIN_DIR_RELATIVE"
|
QT_PLUGIN_DIR="$HOME/.local/$QT_PLUGIN_DIR_RELATIVE"
|
||||||
QT_PLUGIN_EXPORT="export QT_PLUGIN_PATH=\"$QT_PLUGIN_DIR\""
|
QT_PLUGIN_EXPORT="export QT_PLUGIN_PATH=\"$QT_PLUGIN_DIR\""
|
||||||
if [[ ! -f "$BASH_PROFILE" ]] || ! grep -Fq "$QT_PLUGIN_EXPORT" "$BASH_PROFILE" 2>/dev/null; then
|
if [[ ! -f "$BASH_PROFILE" ]] || ! grep -Fq "$QT_PLUGIN_EXPORT" "$BASH_PROFILE" 2>/dev/null; then
|
||||||
|
echo "Adding QT_PLUGIN_PATH to $BASH_PROFILE"
|
||||||
mkdir -p "$(dirname "$BASH_PROFILE")"
|
mkdir -p "$(dirname "$BASH_PROFILE")"
|
||||||
cat >> "$BASH_PROFILE" <<EOF
|
cat >> "$BASH_PROFILE" <<EOF
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,7 @@ void BreezyDesktopEffect::addVirtualDisplay(QSize size)
|
||||||
static int virtualDisplayCount = 0;
|
static int virtualDisplayCount = 0;
|
||||||
++virtualDisplayCount;
|
++virtualDisplayCount;
|
||||||
QString name = QStringLiteral("BreezyDesktop_VirtualDisplay_%1x%2_%3").arg(size.width()).arg(size.height()).arg(virtualDisplayCount);
|
QString name = QStringLiteral("BreezyDesktop_VirtualDisplay_%1x%2_%3").arg(size.width()).arg(size.height()).arg(virtualDisplayCount);
|
||||||
#if defined(KWIN_VERSION_ENCODED) && KWIN_VERSION_ENCODED > 60290
|
#if defined(KWIN_VERSION_ENCODED) && KWIN_VERSION_ENCODED >= 60290
|
||||||
QString description = QStringLiteral("Breezy Display %1x%2 (%3)").arg(size.width()).arg(size.height()).arg(virtualDisplayCount);
|
QString description = QStringLiteral("Breezy Display %1x%2 (%3)").arg(size.width()).arg(size.height()).arg(virtualDisplayCount);
|
||||||
auto output = KWin::kwinApp()->outputBackend()->createVirtualOutput(name, description, size, 1.0);
|
auto output = KWin::kwinApp()->outputBackend()->createVirtualOutput(name, description, size, 1.0);
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue