From 04edf2eecc9439b0529998688a3d51d90980c859 Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Wed, 17 Jul 2024 21:55:49 -0700
Subject: [PATCH 01/18] Add refresh rate and fast SBS mode switching settings
---
gnome/src/cursormanager.js | 1 -
gnome/src/extension.js | 48 +++++++++++++++----
gnome/src/monitormanager.js | 26 ++++++++--
ui/bin/package | 4 +-
.../com.xronlinux.BreezyDesktop.gschema.xml | 18 +++++++
...om.xronlinux.BreezyDesktop.metainfo.xml.in | 8 +++-
ui/src/connecteddevice.py | 8 ++++
ui/src/gtk/connected-device.ui | 22 +++++++++
8 files changed, 118 insertions(+), 17 deletions(-)
diff --git a/gnome/src/cursormanager.js b/gnome/src/cursormanager.js
index c2f5e82..44b3f5f 100644
--- a/gnome/src/cursormanager.js
+++ b/gnome/src/cursormanager.js
@@ -1,5 +1,4 @@
import Clutter from 'gi://Clutter';
-import GLib from 'gi://GLib';
import Meta from 'gi://Meta';
import * as PointerWatcher from 'resource:///org/gnome/shell/ui/pointerWatcher.js';
import { MouseSpriteContent } from './cursor.js';
diff --git a/gnome/src/extension.js b/gnome/src/extension.js
index 16958a5..a7edafd 100644
--- a/gnome/src/extension.js
+++ b/gnome/src/extension.js
@@ -71,6 +71,7 @@ export default class BreezyDesktopExtension extends Extension {
this._monitor_manager = new MonitorManager({
use_optimal_monitor_config: this.settings.get_boolean('use-optimal-monitor-config'),
headset_as_primary: this.settings.get_boolean('headset-as-primary'),
+ use_highest_refresh_rate: this.settings.get_boolean('use-highest-refresh-rate'),
extension_path: this.path
});
this._monitor_manager.setChangeHook(this._handle_monitor_change.bind(this));
@@ -120,7 +121,7 @@ export default class BreezyDesktopExtension extends Extension {
const target_monitor = this._monitor_manager.getMonitorPropertiesList()?.find(
monitor => SUPPORTED_MONITOR_PRODUCTS.includes(monitor.product));
if (target_monitor !== undefined) {
- Globals.logger.log_debug(`BreezyDesktopExtension _find_supported_monitor - Identified supported monitor: ${target_monitor.connector}`);
+ Globals.logger.log(`Identified supported monitor: ${target_monitor.product} on ${target_monitor.connector}`);
return {
monitor: this._monitor_manager.getMonitors()[target_monitor.index],
connector: target_monitor.connector,
@@ -151,8 +152,11 @@ export default class BreezyDesktopExtension extends Extension {
// A false result means we'll expect _handle_monitor_change to be triggered, so active polling
// can be disabled.
_target_monitor_ready(target_monitor) {
- return target_monitor.is_dummy ||
- !this._monitor_manager.needsOptimalModeCheck(target_monitor.connector);
+ if (target_monitor.is_dummy) return true;
+
+ const needs_sbs_mode_switch = this.settings.get_boolean('fast-sbs-mode-switching') &&
+ this._needs_widescreen_monitor_update();
+ return !needs_sbs_mode_switch && !this._monitor_manager.needsOptimalModeCheck(target_monitor.connector);
}
_setup() {
@@ -213,7 +217,7 @@ export default class BreezyDesktopExtension extends Extension {
const widescreen_setting_enabled = this.settings.get_boolean('widescreen-mode');
if (widescreen_setting_enabled !== sbs_enabled) {
Globals.logger.log_debug('BreezyDesktopExtension _needs_widescreen_monitor_update - true');
- this._write_control('sbs_mode', widescreen_setting_enabled ? 'enable' : 'disable');
+ this._request_sbs_mode_change(widescreen_setting_enabled);
return true;
}
@@ -259,7 +263,10 @@ export default class BreezyDesktopExtension extends Extension {
});
this._update_follow_threshold(this.settings);
- this._update_widescreen_mode_from_settings(this.settings);
+
+ // this gets triggered before _effect_enable if in fast-sbs-mode-switching mode
+ if (!this.settings.get_boolean('fast-sbs-mode-switching'))
+ this._update_widescreen_mode_from_settings(this.settings);
this._widescreen_mode_effect_state_connection = this._xr_effect.connect('notify::widescreen-mode-state', this._update_widescreen_mode_from_state.bind(this));
this._supported_device_detected_connected = this._xr_effect.connect('notify::supported-device-detected', this._handle_supported_device_change.bind(this));
@@ -362,16 +369,41 @@ export default class BreezyDesktopExtension extends Extension {
if (value !== undefined) this._write_control('breezy_desktop_follow_threshold', value);
}
+ // requests sbs_mode change and monitors to ensure the state reflects the setting
+ _request_sbs_mode_change(value) {
+ this._write_control('sbs_mode', value ? 'enable' : 'disable');
+ if (!this._sbs_mode_update_timeout) {
+ var attempts = 0;
+ this._sbs_mode_update_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 10000, (() => {
+ if (attempts++ < 3) {
+ this._write_control('sbs_mode', value ? 'enable' : 'disable');
+ return GLib.SOURCE_CONTINUE;
+ }
+
+ // the state never updated to reflect our request, revert the setting
+ this.settings.set_boolean('widescreen-mode', !value);
+ this._sbs_mode_update_timeout = undefined;
+ return GLib.SOURCE_REMOVE;
+ }).bind(this));
+ }
+ }
+
_update_widescreen_mode_from_settings(settings, event) {
const value = settings.get_boolean('widescreen-mode');
Globals.logger.log_debug(`BreezyDesktopExtension _update_widescreen_mode_from_settings ${value}`);
- if (value !== undefined && value !== this._xr_effect.widescreen_mode_state)
- this._write_control('sbs_mode', value ? 'enable' : 'disable');
- else
+ if (value !== undefined && value !== this._xr_effect.widescreen_mode_state) {
+ this._request_sbs_mode_change(value);
+ } else
Globals.logger.log_debug('effect.widescreen_mode_state already matched setting');
}
_update_widescreen_mode_from_state(effect, _pspec) {
+ // kill our state checker if it's running
+ if (this._sbs_mode_update_timeout) {
+ GLib.source_remove(this._sbs_mode_update_timeout);
+ this._sbs_mode_update_timeout = undefined;
+ }
+
const value = effect.widescreen_mode_state;
Globals.logger.log_debug(`BreezyDesktopExtension _update_widescreen_mode_from_state ${value}`);
if (value !== this.settings.get_boolean('widescreen-mode'))
diff --git a/gnome/src/monitormanager.js b/gnome/src/monitormanager.js
index 8126ecf..1d4b98c 100644
--- a/gnome/src/monitormanager.js
+++ b/gnome/src/monitormanager.js
@@ -86,7 +86,7 @@ function getMonitorConfig(displayConfigProxy, callback) {
}
// triggers callback with true result if an an async monitor config change was triggered, false if no config change needed
-function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPrimary, callback) {
+function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPrimary, useHighestRefreshRate, callback) {
Globals.logger.log_debug(`monitormanager.js performOptimalModeCheck for ${connectorName}`);
displayConfigProxy.GetCurrentStateRemote((result, error) => {
if (error) {
@@ -101,10 +101,19 @@ function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPri
let monitorToModeIdMap = {};
let bestFitMode = undefined;
for (let monitor of monitors) {
- const [details, modes, monProperties] = monitor;
+ const [details, availableModes, monProperties] = monitor;
const [connector, vendor, product, monitorSerial] = details;
const isOurMonitor = connector == connectorName;
- if (isOurMonitor) ourMonitor = monitor;
+ let modes = availableModes;
+ if (isOurMonitor) {
+ ourMonitor = monitor;
+ if (!useHighestRefreshRate) {
+ const currentMode = modes.find((mode) => !!mode[6]['is-current']);
+
+ // filter modes to only include the current refresh rate
+ modes = availableModes.filter((mode) => mode[3] === currentMode[3]);
+ }
+ }
for (let mode of modes) {
const [modeId, width, height, refreshRate, preferredScale, supportedScales, modeProperites] = mode;
@@ -199,6 +208,13 @@ export const MonitorManager = GObject.registerClass({
GObject.ParamFlags.READWRITE,
true
),
+ 'use-highest-refresh-rate': GObject.ParamSpec.boolean(
+ 'use-highest-refresh-rate',
+ 'Use highest refresh rate',
+ 'Set the highest refresh rate which choosing optimal configs',
+ GObject.ParamFlags.READWRITE,
+ true
+ ),
'headset-as-primary': GObject.ParamSpec.boolean(
'headset-as-primary',
'Use headset as primary monitor',
@@ -272,7 +288,7 @@ export const MonitorManager = GObject.registerClass({
}
if (this._needsConfigCheck) {
- performOptimalModeCheck(this._displayConfigProxy, monitorConnector, this.headset_as_primary, ((configChanged, error) => {
+ performOptimalModeCheck(this._displayConfigProxy, monitorConnector, this.headset_as_primary, this.use_highest_refresh_rate, ((configChanged, error) => {
this._needsConfigCheck = false;
if (error) {
Globals.logger.log(`Failed to switch to optimal mode for monitor ${monitorConnector}: ${error}`);
@@ -309,7 +325,7 @@ export const MonitorManager = GObject.registerClass({
for (let i = 0; i < result.length; i++) {
const [monitorName, connectorName, vendor, product, serial, refreshRate] = result[i];
const monitorIndex = this._backendManager.get_monitor_for_connector(connectorName);
- Globals.logger.log(`Found monitor ${monitorName}, vendor ${vendor}, product ${product}, serial ${serial}, connector ${connectorName}, index ${monitorIndex}`);
+ Globals.logger.log_debug(`Found monitor ${monitorName}, vendor ${vendor}, product ${product}, serial ${serial}, connector ${connectorName}, index ${monitorIndex}`);
if (monitorIndex >= 0) {
monitorProperties[monitorIndex] = {
index: monitorIndex,
diff --git a/ui/bin/package b/ui/bin/package
index a3c6764..7b04f59 100755
--- a/ui/bin/package
+++ b/ui/bin/package
@@ -16,12 +16,12 @@ check_command "flatpak-builder"
# https://stackoverflow.com/a/246128
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
-TMP_DIR=$(mktemp -d -t breezy-ui-flatpak-XXXXXXXXXX)
+TMP_DIR=$(mktemp -d -t --tmpdir=$SCRIPT_DIR/.. breezy-ui-flatpak-XXXXXXXXXX)
OUT_DIR=$SCRIPT_DIR/../out
rm -rf $OUT_DIR
mkdir -p $OUT_DIR
-flatpak-builder --force-clean $TMP_DIR/build $SCRIPT_DIR/../com.xronlinux.BreezyDesktop.json
+flatpak-builder --force-clean --delete-build-dirs $TMP_DIR/build $SCRIPT_DIR/../com.xronlinux.BreezyDesktop.json
flatpak build-export $TMP_DIR/export $TMP_DIR/build
flatpak build-bundle $TMP_DIR/export $OUT_DIR/com.xronlinux.BreezyDesktop.flatpak com.xronlinux.BreezyDesktop --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
diff --git a/ui/data/com.xronlinux.BreezyDesktop.gschema.xml b/ui/data/com.xronlinux.BreezyDesktop.gschema.xml
index 7b33ad7..4372563 100644
--- a/ui/data/com.xronlinux.BreezyDesktop.gschema.xml
+++ b/ui/data/com.xronlinux.BreezyDesktop.gschema.xml
@@ -118,6 +118,24 @@
Automatically set the headset as the primary display upon connection
+
+
+ true
+
+ Use highest refresh rate
+
+ Automatically set the highest refresh rate upon connection
+
+
+
+
+ true
+
+ Fast SBS mode switching
+
+ Enable fast SBS mode switching
+
+
false
diff --git a/ui/data/com.xronlinux.BreezyDesktop.metainfo.xml.in b/ui/data/com.xronlinux.BreezyDesktop.metainfo.xml.in
index eab0852..b16137d 100644
--- a/ui/data/com.xronlinux.BreezyDesktop.metainfo.xml.in
+++ b/ui/data/com.xronlinux.BreezyDesktop.metainfo.xml.in
@@ -3,7 +3,13 @@
com.xronlinux.BreezyDesktop.desktop
CC0-1.0
GPL-3.0-or-later
+ Breezy Desktop
+ XR Desktop Control Panel
- No description
+ XR Desktop Control Panel
+
+ Office
+ Development
+
diff --git a/ui/src/connecteddevice.py b/ui/src/connecteddevice.py
index 241c4d5..133d2c2 100644
--- a/ui/src/connecteddevice.py
+++ b/ui/src/connecteddevice.py
@@ -31,6 +31,8 @@ class ConnectedDevice(Gtk.Box):
toggle_follow_shortcut_label = Gtk.Template.Child()
headset_as_primary_switch = Gtk.Template.Child()
use_optimal_monitor_config_switch = Gtk.Template.Child()
+ use_highest_refresh_rate_switch = Gtk.Template.Child()
+ fast_sbs_mode_switch = Gtk.Template.Child()
movement_look_ahead_scale = Gtk.Template.Child()
movement_look_ahead_adjustment = Gtk.Template.Child()
@@ -52,6 +54,8 @@ class ConnectedDevice(Gtk.Box):
self.reassign_toggle_follow_shortcut_button,
self.headset_as_primary_switch,
self.use_optimal_monitor_config_switch,
+ self.use_highest_refresh_rate_switch,
+ self.fast_sbs_mode_switch,
self.movement_look_ahead_scale
]
@@ -66,6 +70,8 @@ class ConnectedDevice(Gtk.Box):
self.settings.bind('curved-display', self.curved_display_switch, 'active', Gio.SettingsBindFlags.DEFAULT)
self.settings.bind('headset-as-primary', self.headset_as_primary_switch, 'active', Gio.SettingsBindFlags.DEFAULT)
self.settings.bind('use-optimal-monitor-config', self.use_optimal_monitor_config_switch, 'active', Gio.SettingsBindFlags.DEFAULT)
+ self.settings.bind('use-highest-refresh-rate', self.use_highest_refresh_rate_switch, 'active', Gio.SettingsBindFlags.DEFAULT)
+ self.settings.bind('fast-sbs-mode-switching', self.fast_sbs_mode_switch, 'active', Gio.SettingsBindFlags.DEFAULT)
self.settings.bind('look-ahead-override', self.movement_look_ahead_adjustment, 'value', Gio.SettingsBindFlags.DEFAULT)
bind_shortcut_settings(self.get_parent(), [
@@ -136,8 +142,10 @@ class ConnectedDevice(Gtk.Box):
def _refresh_use_optimal_monitor_config(self, switch, param):
self.headset_as_primary_switch.set_sensitive(switch.get_active())
+ self.use_highest_refresh_rate_switch.set_sensitive(switch.get_active())
if not switch.get_active():
self.headset_as_primary_switch.set_active(False)
+ self.use_highest_refresh_rate_switch.set_active(False)
def set_device_name(self, name):
self.device_label.set_markup(f"{name}")
diff --git a/ui/src/gtk/connected-device.ui b/ui/src/gtk/connected-device.ui
index 215ca1c..b5953c3 100644
--- a/ui/src/gtk/connected-device.ui
+++ b/ui/src/gtk/connected-device.ui
@@ -328,6 +328,17 @@
+
+
+
Always primary display
@@ -339,6 +350,17 @@
+
+
+ Fast SBS mode switching
+ Switches glasses to SBS mode immediately when plugged in, if widescreen mode is on. May cause instability.
+
+
+ 3
+
+
+
+
Movement look-ahead
From eb81b7af4a3a81ca4aaef7235d75b519db0c8262 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20H=C3=BCbner?=
Date: Fri, 19 Jul 2024 01:51:49 +0200
Subject: [PATCH 02/18] Add PKGBUILD file (#25)
---
PKGBUILD | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
ui/src/main.py | 14 ++++++---
ui/src/window.py | 12 +++++---
3 files changed, 94 insertions(+), 8 deletions(-)
create mode 100644 PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..5e51859
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,76 @@
+# Maintainer: hodasemi
+_pkgbase=breezy-desktop
+pkgname="${_pkgbase}"-gnome
+pkgver=0.1
+pkgrel=1
+pkgdesc="Breezy desktop - XR desktop"
+arch=('x86_64')
+url="https://github.com/wheaney/breezy-desktop"
+license=('GPL-3.0')
+makedepends=('ninja' 'meson' 'librsvg')
+depends=('python' 'python-pydbus' 'gnome-shell' 'XRLinuxDriver-BreezyGNOME')
+conflicts=("${_pkgbase}")
+source=("git+${url}")
+md5sums=(SKIP)
+
+_uuid="breezydesktop@xronlinux.com"
+
+build() {
+ cd ${_pkgbase}
+
+ # init submodules (only required ones)
+ git submodule update --init --recursive modules/sombrero
+ git submodule update --init --recursive ui/modules/PyXRLinuxDriverIPC
+
+ # build binaries
+ cd ui
+ meson setup build
+ cd build
+ meson compile
+
+ # prepare extension
+ cd ../..
+ unlink gnome/src/schemas/com.xronlinux.BreezyDesktop.gschema.xml
+ cp ui/data/com.xronlinux.BreezyDesktop.gschema.xml gnome/src/schemas/
+ glib-compile-schemas --targetdir="gnome/src/schemas" "gnome/src/schemas"
+
+ unlink gnome/src/textures/custom_banner.png
+ cp vulkan/custom_banner.png gnome/src/textures/
+
+ unlink gnome/src/textures/calibrating.png
+ cp modules/sombrero/calibrating.png gnome/src/textures/
+
+ unlink gnome/src/IMUAdjust.frag
+ cp modules/sombrero/IMUAdjust.frag gnome/src/
+
+ # create icon
+ rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 64 -h 64 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_64.png
+ rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 128 -h 128 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_128.png
+ rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 256 -h 256 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_256.png
+ rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 1024 -h 1024 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_1024.png
+}
+
+package() {
+ # copy gnome extension
+ install -Dm755 ${_pkgbase}/ui/data/com.xronlinux.BreezyDesktop.gschema.xml "${pkgdir}"/usr/share/glib-2.0/schemas/com.xronlinux.BreezyDesktop.gschema.xml
+
+ install -d "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/"
+ cp -r ${_pkgbase}/gnome/src/* "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/"
+
+ # copy binaries
+ install -d "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop/
+ cp -r ${_pkgbase}/ui/src/*.py "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop/
+ install -Dm755 ${_pkgbase}/ui/modules/PyXRLinuxDriverIPC/xrdriveripc.py "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop/xrdriveripc.py
+
+ install -Dm755 ${_pkgbase}/ui/build/src/breezydesktop "${pkgdir}"/usr/bin/breezydesktop
+
+ install -Dm755 ${_pkgbase}/ui/build/src/breezydesktop.gresource "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop.gresource
+ install -Dm755 ${_pkgbase}/ui/build/data/com.xronlinux.BreezyDesktop.desktop "${pkgdir}"/usr/share/applications/com.xronlinux.BreezyDesktop.desktop
+ sed -i '/Exec/c\Exec=breezydesktop --skip-verification' "${pkgdir}"/usr/share/applications/com.xronlinux.BreezyDesktop.desktop
+
+ install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_64.png "${pkgdir}"/usr/share/icons/hicolor/64x64/apps/com.xronlinux.BreezyDesktop.png
+ install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_128.png "${pkgdir}"/usr/share/icons/hicolor/128x128/apps/com.xronlinux.BreezyDesktop.png
+ install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_256.png "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/com.xronlinux.BreezyDesktop.png
+ install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_1024.png "${pkgdir}"/usr/share/icons/hicolor/1024x1024/apps/com.xronlinux.BreezyDesktop.png
+}
+
diff --git a/ui/src/main.py b/ui/src/main.py
index a2a2281..8781f21 100644
--- a/ui/src/main.py
+++ b/ui/src/main.py
@@ -21,6 +21,7 @@ import gi
import logging
import os
import sys
+import argparse
from logging.handlers import TimedRotatingFileHandler
@@ -58,13 +59,14 @@ XRDriverIPC.set_instance(XRDriverIPC(logger))
class BreezydesktopApplication(Adw.Application):
"""The main application singleton class."""
- def __init__(self):
+ def __init__(self, skip_verification):
super().__init__(application_id='com.xronlinux.BreezyDesktop',
flags=Gio.ApplicationFlags.DEFAULT_FLAGS)
self.create_action('quit', self.on_quit_action, ['q'])
self.create_action('about', self.on_about_action)
self.create_action('license', self.on_license_action)
self.create_action('reset_driver', self.on_reset_driver_action)
+ self._skip_verification = skip_verification
def do_activate(self):
"""Called when the application is activated.
@@ -74,7 +76,7 @@ class BreezydesktopApplication(Adw.Application):
"""
win = self.props.active_window
if not win:
- win = BreezydesktopWindow(application=self)
+ win = BreezydesktopWindow(self._skip_verification, application=self)
win.connect('close-request', lambda *_: self.on_quit_action())
win.connect('destroy', lambda *_: self.on_quit_action())
win.present()
@@ -125,5 +127,9 @@ class BreezydesktopApplication(Adw.Application):
def main(version):
- app = BreezydesktopApplication()
- return app.run(sys.argv)
+ parser = argparse.ArgumentParser()
+ parser.add_argument("-sv", "--skip-verification", action="store_true")
+ args = parser.parse_args()
+
+ app = BreezydesktopApplication(args.skip_verification)
+ return app.run(None)
diff --git a/ui/src/window.py b/ui/src/window.py
index 2c4f45e..1b14066 100644
--- a/ui/src/window.py
+++ b/ui/src/window.py
@@ -37,7 +37,7 @@ class BreezydesktopWindow(Gtk.ApplicationWindow):
license_action_needed_banner = Gtk.Template.Child()
missing_breezy_features_banner = Gtk.Template.Child()
- def __init__(self, **kwargs):
+ def __init__(self, skip_verification, **kwargs):
super().__init__(**kwargs)
self.state_manager = StateManager.get_instance()
@@ -57,6 +57,8 @@ class BreezydesktopWindow(Gtk.ApplicationWindow):
self._handle_state_update(self.state_manager, None)
+ self._skip_verification = skip_verification
+
self.connect("destroy", self._on_window_destroy)
def _handle_state_update(self, state_manager, val):
@@ -71,9 +73,11 @@ class BreezydesktopWindow(Gtk.ApplicationWindow):
for child in self.main_content:
self.main_content.remove(child)
- if not verify_installation():
- self.main_content.append(self.failed_verification)
- elif not self.state_manager.get_property('license-present'):
+ if not self._skip_verification:
+ if not verify_installation():
+ self.main_content.append(self.failed_verification)
+
+ if not self.state_manager.get_property('license-present'):
self.main_content.append(self.no_license)
elif not ExtensionsManager.get_instance().is_installed():
self.main_content.append(self.no_extension)
From 3b512d0d8ace845003be24997daa090661fa2fff Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Thu, 18 Jul 2024 17:03:57 -0700
Subject: [PATCH 03/18] Move PKGBUILD to AUR repo
https://aur.archlinux.org/breezy-desktop-gnome-git.git
---
PKGBUILD | 76 --------------------------------------------------------
1 file changed, 76 deletions(-)
delete mode 100644 PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
deleted file mode 100644
index 5e51859..0000000
--- a/PKGBUILD
+++ /dev/null
@@ -1,76 +0,0 @@
-# Maintainer: hodasemi
-_pkgbase=breezy-desktop
-pkgname="${_pkgbase}"-gnome
-pkgver=0.1
-pkgrel=1
-pkgdesc="Breezy desktop - XR desktop"
-arch=('x86_64')
-url="https://github.com/wheaney/breezy-desktop"
-license=('GPL-3.0')
-makedepends=('ninja' 'meson' 'librsvg')
-depends=('python' 'python-pydbus' 'gnome-shell' 'XRLinuxDriver-BreezyGNOME')
-conflicts=("${_pkgbase}")
-source=("git+${url}")
-md5sums=(SKIP)
-
-_uuid="breezydesktop@xronlinux.com"
-
-build() {
- cd ${_pkgbase}
-
- # init submodules (only required ones)
- git submodule update --init --recursive modules/sombrero
- git submodule update --init --recursive ui/modules/PyXRLinuxDriverIPC
-
- # build binaries
- cd ui
- meson setup build
- cd build
- meson compile
-
- # prepare extension
- cd ../..
- unlink gnome/src/schemas/com.xronlinux.BreezyDesktop.gschema.xml
- cp ui/data/com.xronlinux.BreezyDesktop.gschema.xml gnome/src/schemas/
- glib-compile-schemas --targetdir="gnome/src/schemas" "gnome/src/schemas"
-
- unlink gnome/src/textures/custom_banner.png
- cp vulkan/custom_banner.png gnome/src/textures/
-
- unlink gnome/src/textures/calibrating.png
- cp modules/sombrero/calibrating.png gnome/src/textures/
-
- unlink gnome/src/IMUAdjust.frag
- cp modules/sombrero/IMUAdjust.frag gnome/src/
-
- # create icon
- rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 64 -h 64 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_64.png
- rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 128 -h 128 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_128.png
- rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 256 -h 256 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_256.png
- rsvg-convert ui/data/icons/hicolor/scalable/apps/com.xronlinux.BreezyDesktop.svg -w 1024 -h 1024 -o ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_1024.png
-}
-
-package() {
- # copy gnome extension
- install -Dm755 ${_pkgbase}/ui/data/com.xronlinux.BreezyDesktop.gschema.xml "${pkgdir}"/usr/share/glib-2.0/schemas/com.xronlinux.BreezyDesktop.gschema.xml
-
- install -d "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/"
- cp -r ${_pkgbase}/gnome/src/* "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/"
-
- # copy binaries
- install -d "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop/
- cp -r ${_pkgbase}/ui/src/*.py "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop/
- install -Dm755 ${_pkgbase}/ui/modules/PyXRLinuxDriverIPC/xrdriveripc.py "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop/xrdriveripc.py
-
- install -Dm755 ${_pkgbase}/ui/build/src/breezydesktop "${pkgdir}"/usr/bin/breezydesktop
-
- install -Dm755 ${_pkgbase}/ui/build/src/breezydesktop.gresource "${pkgdir}"/usr/local/share/breezydesktop/breezydesktop.gresource
- install -Dm755 ${_pkgbase}/ui/build/data/com.xronlinux.BreezyDesktop.desktop "${pkgdir}"/usr/share/applications/com.xronlinux.BreezyDesktop.desktop
- sed -i '/Exec/c\Exec=breezydesktop --skip-verification' "${pkgdir}"/usr/share/applications/com.xronlinux.BreezyDesktop.desktop
-
- install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_64.png "${pkgdir}"/usr/share/icons/hicolor/64x64/apps/com.xronlinux.BreezyDesktop.png
- install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_128.png "${pkgdir}"/usr/share/icons/hicolor/128x128/apps/com.xronlinux.BreezyDesktop.png
- install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_256.png "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/com.xronlinux.BreezyDesktop.png
- install -Dm755 ${_pkgbase}/ui/data/icons/hicolor/com.xronlinux.BreezyDesktop_1024.png "${pkgdir}"/usr/share/icons/hicolor/1024x1024/apps/com.xronlinux.BreezyDesktop.png
-}
-
From 182096bdf62e98a5c1ee004608edb1b64f374980 Mon Sep 17 00:00:00 2001
From: Wayne Heaney <42350981+wheaney@users.noreply.github.com>
Date: Thu, 18 Jul 2024 17:30:53 -0700
Subject: [PATCH 04/18] Update README.md
Add AUR setup instructions
---
README.md | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index c0400ff..f2206cb 100644
--- a/README.md
+++ b/README.md
@@ -16,11 +16,17 @@ There are two installations at the moment. **Note: Only install one of these at
Breezy GNOME is a virtual workspace solution for Linux desktops that use the GNOME desktop environment (requires GNOME 45+ on an x86_64 system); see [non-GNOME setup](#non-gnome-setup) if you want to try it without a GNOME desktop environment. It currently supports one virtual monitor and multiple physical monitors, but it will soon support multiple virtual monitors. See [upcoming features](#upcoming-features) for more improvements on the horizon.
### GNOME Setup
-1. Ensure you have the latest graphics drivers installed for your distro.
-2. Download the Breezy GNOME [setup script](https://github.com/wheaney/breezy-desktop/releases/latest/download/breezy_gnome_setup) and set the execute flag (e.g. from the terminal: `chmod +x ~/Downloads/breezy_gnome_setup`)
-3. Run the setup script (e.g. `~/Downloads/breezy_gnome_setup`)
-4. You'll have an application called `Breezy Desktop` installed. Launch that and follow any instructions. You will need to log out and back in at least once to get the GNOME extension working.
-5. For a double-wide screen, enable "widescreen mode" using the toggle in the Breezy Desktop application. **Note: this can be significantly more resource intensive than non-widescreen, you may notice performance dips on older hardware**
+
+For the best performance, ensure you have the latest graphics drivers installed for your distro.
+
+#### Arch Linux
+
+Breezy GNOME is in AUR (but not pacman, yet). To install: `yay -S breezy-desktop-gnome-git`
+
+#### All other distros
+
+1. Download the Breezy GNOME [setup script](https://github.com/wheaney/breezy-desktop/releases/latest/download/breezy_gnome_setup) and set the execute flag (e.g. from the terminal: `chmod +x ~/Downloads/breezy_gnome_setup`)
+2. Run the setup script (e.g. `~/Downloads/breezy_gnome_setup`)
### Non-GNOME Setup
A workable solution (with some [QoL improvements needed](#upcoming-features)) is to use your preferred desktop environment with a GNOME window open in nested mode. To do this:
@@ -29,7 +35,10 @@ A workable solution (with some [QoL improvements needed](#upcoming-features)) is
3. Launch the nested GNOME Shell using `MUTTER_DEBUG_DUMMY_MODE_SPECS="1920x1080@60" dbus-run-session -- gnome-shell --nested`
### Breezy GNOME Usage
-All controls are provided through the Breezy Desktop application. You can also configure keyboard shortcuts for the most common toggle actions. The Breezy Desktop app doesn't have to be running to use the virtual desktop or the keyboard shortcuts once you've configured everything to your liking.
+
+After setup, you'll have an application called `Breezy Desktop` installed. Launch that and follow any instructions. You will need to log out and back in at least once to get the GNOME extension working. You can also configure keyboard shortcuts for the most common toggle actions. The Breezy Desktop app doesn't have to be running to use the virtual desktop or the keyboard shortcuts once you've configured everything to your liking.
+
+For a double-wide screen, enable "widescreen mode" using the toggle in the Breezy Desktop application. **Note: this can be significantly more resource intensive than non-widescreen, you may notice performance dips on older hardware.**
### Upcoming Features
1. Port to GNOME 43/44
From 44b1ebe464066bc414843a1bb4f5dd150ae221ed Mon Sep 17 00:00:00 2001
From: Wayne Heaney <42350981+wheaney@users.noreply.github.com>
Date: Thu, 18 Jul 2024 17:40:36 -0700
Subject: [PATCH 05/18] Add multi-arch build support (#29)
---
bin/package_gnome | 47 ++++++++++++++++++++++++-----------
gnome/bin/breezy_gnome_verify | 2 +-
gnome/bin/package_extension | 5 ----
modules/XRLinuxDriver | 2 +-
ui/bin/package | 11 +++++---
5 files changed, 41 insertions(+), 26 deletions(-)
diff --git a/bin/package_gnome b/bin/package_gnome
index 7a17003..b4a112b 100755
--- a/bin/package_gnome
+++ b/bin/package_gnome
@@ -3,15 +3,21 @@
# exit when any command fails
set -e
+ARCH=${ARCH:-$(uname -m)}
+echo "Building Breezy GNOME for $ARCH"
+
# https://stackoverflow.com/a/246128
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
ROOT_DIR=$(realpath $SCRIPT_DIR/..)
VULKAN_DIR=$ROOT_DIR/vulkan
GNOME_DIR=$ROOT_DIR/gnome
GNOME_BUILD_DIR=$GNOME_DIR/build
+BUILD_FILE_NAME=breezyGNOME-$ARCH.tar.gz
-rm -rf $GNOME_BUILD_DIR
mkdir -p $GNOME_BUILD_DIR
+if [ -e "$GNOME_BUILD_DIR/$BUILD_FILE_NAME" ]; then
+ rm $GNOME_BUILD_DIR/$BUILD_FILE_NAME
+fi
PACKAGE_DIR=$GNOME_BUILD_DIR/breezy_gnome
rm -rf $PACKAGE_DIR
@@ -20,9 +26,6 @@ mkdir -p $PACKAGE_DIR
XREAL_DRIVER_DIR=$ROOT_DIR/modules/XRLinuxDriver
source $XREAL_DRIVER_DIR/bin/inject_ua
-# check out submodules, recursively for nested ones
-git submodule update --init --recursive
-
# if a custom_banner image exists, copy it over the sombrero one
if [ -e "$VULKAN_DIR/custom_banner.png" ]; then
cp $VULKAN_DIR/custom_banner.png $PACKAGE_DIR
@@ -32,10 +35,10 @@ fi
mkdir -p $PACKAGE_DIR/bin
copy_and_inject_ua "$XREAL_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$GNOME_DIR/bin/setup" "$GNOME_DIR/bin/breezy_gnome_verify" "$GNOME_DIR/bin/breezy_gnome_uninstall"
-XREAL_BINARY=$XREAL_DRIVER_DIR/build/xrealAirLinuxDriver.tar.gz
+XREAL_BINARY=$XREAL_DRIVER_DIR/out/xrealAirLinuxDriver-$ARCH.tar.gz
pushd $XREAL_DRIVER_DIR
-if [ ! -e "$XREAL_BINARY" ] || [ "$1" != "--skip-module-builds" ]; then
+if [ ! -e "$XREAL_BINARY" ] || [ "$1" == "--rebuild-driver" ]; then
# if a file exists at custom_banner_config.yml, copy it to the xrealAirLinuxDriver directory
if [ -e "$VULKAN_DIR/custom_banner_config.yml" ]; then
cp $VULKAN_DIR/custom_banner_config.yml $XREAL_DRIVER_DIR
@@ -44,25 +47,33 @@ if [ ! -e "$XREAL_BINARY" ] || [ "$1" != "--skip-module-builds" ]; then
# strange issue where the base library produces a .so file if the build is not cleaned
rm -rf build/
- BREEZY_DESKTOP=1 bin/package
+ docker-build/init.sh
+ BREEZY_DESKTOP=1 docker-build/run-build.sh $ARCH
fi
-
-XREAL_MANIFEST_LINE=$(sha256sum build/driver_air_glasses/manifest)
popd
-cp $XREAL_BINARY $PACKAGE_DIR
+TMP_DIR=$(mktemp -d -t breezy-gnome-XXXXXXXXXX)
+pushd $TMP_DIR
+cp $XREAL_BINARY $TMP_DIR/xrealAirLinuxDriver.tar.gz
+tar -xf $TMP_DIR/xrealAirLinuxDriver.tar.gz
+
+XREAL_MANIFEST_LINE=$(sha256sum driver_air_glasses/manifest)
+popd
+rm -rf $TMP_DIR
+
+cp $XREAL_BINARY $PACKAGE_DIR/xrealAirLinuxDriver.tar.gz
cp $XREAL_DRIVER_DIR/bin/xreal_driver_setup $PACKAGE_DIR/bin
gnome/bin/package_extension
-cp gnome/out/* $PACKAGE_DIR
+cp gnome/out/breezydesktop@xronlinux.com.shell-extension.zip $PACKAGE_DIR
# create a checksum that combines the checksums of all files in the directory
pushd gnome/src
GNOME_MANIFEST_LINE=$(find -L . -type f ! -name "*.compiled" -exec sha256sum {} \; | sort | sha256sum | sed 's/ .*//')
popd
-ui/bin/package
-cp ui/out/* $PACKAGE_DIR
+ui/bin/package $ARCH
+cp ui/out/com.xronlinux.BreezyDesktop-$ARCH.flatpak $PACKAGE_DIR/com.xronlinux.BreezyDesktop.flatpak
# create manifest file for verifying installed file checksums against the originally packaged versions
# include any file that doesn't get modified during setup (e.g. vkBasalt.json files)
@@ -73,5 +84,11 @@ popd
# bundle everything up
pushd $GNOME_BUILD_DIR
-tar -zcvf breezyGNOME.tar.gz breezy_gnome
-popd
\ No newline at end of file
+tar -zcvf $BUILD_FILE_NAME breezy_gnome
+popd
+
+mkdir -p out
+if [ -e "out/$BUILD_FILE_NAME" ]; then
+ rm out/$BUILD_FILE_NAME
+fi
+cp $GNOME_BUILD_DIR/$BUILD_FILE_NAME out
\ No newline at end of file
diff --git a/gnome/bin/breezy_gnome_verify b/gnome/bin/breezy_gnome_verify
index c91b47b..af525ba 100755
--- a/gnome/bin/breezy_gnome_verify
+++ b/gnome/bin/breezy_gnome_verify
@@ -12,7 +12,7 @@ DATA_DIR="$XDG_DATA_HOME/breezy_gnome"
# create a string to string mapping, file name to expected file location
declare -A file_paths
file_paths=(
- ["build/driver_air_glasses/manifest"]="$USER_HOME/.local/bin/xr_driver/manifest"
+ ["driver_air_glasses/manifest"]="$USER_HOME/.local/bin/xr_driver/manifest"
["breezydesktop@xronlinux.com"]="$XDG_DATA_HOME/gnome-shell/extensions/breezydesktop@xronlinux.com"
)
diff --git a/gnome/bin/package_extension b/gnome/bin/package_extension
index 69af779..346c2ad 100755
--- a/gnome/bin/package_extension
+++ b/gnome/bin/package_extension
@@ -5,11 +5,6 @@ UUID="breezydesktop@xronlinux.com"
# fail on error
set -e
-if [[ $EUID -eq 0 ]]; then
- echo "This script must NOT be run as root" 1>&2
- exit 1
-fi
-
# https://stackoverflow.com/a/246128
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver
index b97faa8..45d895f 160000
--- a/modules/XRLinuxDriver
+++ b/modules/XRLinuxDriver
@@ -1 +1 @@
-Subproject commit b97faa82a7767e4270e46886d68dd1c70b71abca
+Subproject commit 45d895f409b35662af206c0921922452ceb5b6d7
diff --git a/ui/bin/package b/ui/bin/package
index 7b04f59..b257757 100755
--- a/ui/bin/package
+++ b/ui/bin/package
@@ -3,6 +3,9 @@
# exit when any command fails
set -e
+ARCH=${ARCH:-$(uname -m)}
+echo "Building Breezy UI for $ARCH"
+
check_command() {
if ! command -v "$1" &>/dev/null; then
echo "Please install \"$1\" and make sure it's available in your \$PATH"
@@ -16,13 +19,13 @@ check_command "flatpak-builder"
# https://stackoverflow.com/a/246128
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
-TMP_DIR=$(mktemp -d -t --tmpdir=$SCRIPT_DIR/.. breezy-ui-flatpak-XXXXXXXXXX)
+TMP_DIR=$(mktemp -d --tmpdir=$SCRIPT_DIR/.. -t .breezy-ui-flatpak-XXXXXXXXXX)
OUT_DIR=$SCRIPT_DIR/../out
rm -rf $OUT_DIR
mkdir -p $OUT_DIR
-flatpak-builder --force-clean --delete-build-dirs $TMP_DIR/build $SCRIPT_DIR/../com.xronlinux.BreezyDesktop.json
-flatpak build-export $TMP_DIR/export $TMP_DIR/build
-flatpak build-bundle $TMP_DIR/export $OUT_DIR/com.xronlinux.BreezyDesktop.flatpak com.xronlinux.BreezyDesktop --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
+flatpak-builder --arch $ARCH --disable-rofiles-fuse --disable-cache --force-clean --delete-build-dirs --user $TMP_DIR/build $SCRIPT_DIR/../com.xronlinux.BreezyDesktop.json
+flatpak build-export --arch $ARCH $TMP_DIR/export $TMP_DIR/build
+flatpak build-bundle --arch $ARCH $TMP_DIR/export $OUT_DIR/com.xronlinux.BreezyDesktop-$ARCH.flatpak com.xronlinux.BreezyDesktop --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
rm -rf "$TMP_DIR"
\ No newline at end of file
From 54a9422c66ec32de1162ce0f8561726a41f50fd7 Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Thu, 18 Jul 2024 17:49:13 -0700
Subject: [PATCH 06/18] Update setup script to download the arch-specific
binary
---
bin/breezy_gnome_setup | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/bin/breezy_gnome_setup b/bin/breezy_gnome_setup
index c3714cd..eff137e 100755
--- a/bin/breezy_gnome_setup
+++ b/bin/breezy_gnome_setup
@@ -13,6 +13,10 @@ fi
start_dir=$(pwd)
+
+ARCH=$(uname -m)
+echo "Building for $ARCH"
+
# create temp directory
tmp_dir=$(mktemp -d -t breezy-gnome-XXXXXXXXXX)
pushd $tmp_dir > /dev/null
@@ -25,7 +29,7 @@ then
binary_path_arg="$3"
elif [ "$1" = "--tag" ] && [ -n "$2" ]
then
- binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/breezyGNOME.tar.gz"
+ binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/breezyGNOME-$ARCH.tar.gz"
else
binary_path_arg="$1"
fi
@@ -33,8 +37,9 @@ fi
if [ -z "$binary_path_arg" ]
then
# download and unzip the binary
- echo "Downloading to: ${tmp_dir}/breezyGNOME.tar.gz"
+ echo "Downloading to: ${tmp_dir}/breezyGNOME-$ARCH.tar.gz"
curl -L -O $binary_download_url
+ binary_path_arg="breezyGNOME-$ARCH.tar.gz"
else
if [[ "$binary_path_arg" = /* ]]; then
abs_path="$binary_path_arg"
@@ -45,16 +50,8 @@ else
cp $abs_path $tmp_dir
fi
-# if abs_path is present, grab the filename from it
-if [ -n "$abs_path" ]
-then
- filename=$(basename $abs_path)
-else
- filename="breezyGNOME.tar.gz"
-fi
-
echo "Extracting to: ${tmp_dir}/breezy_gnome"
-tar -xf $filename
+tar -xf $(basename $binary_path_arg)
pushd breezy_gnome > /dev/null
From fed16be20cf917d8c48c15541414d1382d587704 Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Thu, 18 Jul 2024 17:52:05 -0700
Subject: [PATCH 07/18] Pull in the latest verison of the driver
---
modules/XRLinuxDriver | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver
index 45d895f..21452bc 160000
--- a/modules/XRLinuxDriver
+++ b/modules/XRLinuxDriver
@@ -1 +1 @@
-Subproject commit 45d895f409b35662af206c0921922452ceb5b6d7
+Subproject commit 21452bcf6a073888186448e247ed8ddca85946aa
From aae2ef1b9ac504ec06e266c041a5d604c195eb9c Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Thu, 18 Jul 2024 21:20:59 -0700
Subject: [PATCH 08/18] Fix broken download URL
---
bin/breezy_gnome_setup | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/breezy_gnome_setup b/bin/breezy_gnome_setup
index eff137e..436d335 100755
--- a/bin/breezy_gnome_setup
+++ b/bin/breezy_gnome_setup
@@ -22,7 +22,7 @@ tmp_dir=$(mktemp -d -t breezy-gnome-XXXXXXXXXX)
pushd $tmp_dir > /dev/null
echo "Created temp directory: ${tmp_dir}"
-binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/breezyGNOME.tar.gz"
+binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/breezyGNOME-$ARCH.tar.gz"
if [ "$1" = "-v" ]
then
metrics_version="$2"
From 9365f18668ba5632e93badaf2318bf693c32d566 Mon Sep 17 00:00:00 2001
From: Wayne Heaney <42350981+wheaney@users.noreply.github.com>
Date: Fri, 19 Jul 2024 13:54:42 -0700
Subject: [PATCH 09/18] Update README.md
Add breezy gnome uninstall instructions
---
README.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f2206cb..cdb8894 100644
--- a/README.md
+++ b/README.md
@@ -152,7 +152,11 @@ Rerun the `breezy_vulkan_setup` script. No need to re-download this script, as i
### Uninstalling
-If you wish to completely remove the installation, run the following: `sudo ~/bin/breezy_vulkan_uninstall`. This won't uninstall the base driver package, follow the instructions at the end of the uninstallation to do this manually.
+If you wish to completely remove the installation:
+* For **Breezy GNOME**:
+ * If you installed *via the setup script* run the following: `~/$XDG_BIN_HOME/breezy_gnome_uninstall` or `~/.local/bin/breezy_gnome_uninstall` if the XDG variable isn't set
+ * If you installed via `yay` run the following: `pacman -R breezy-desktop-gnome-git`, you may also want to uninstall the base driver with `pacman -R xr-driver-breezy-gnome-git`
+* For **Breezy Vulkan** run the following: `sudo ~/bin/breezy_vulkan_uninstall`. This won't uninstall the base driver package, follow the instructions at the end of the uninstallation to do this manually.
## Data Privacy Notice
From 71585d0328d78a3c39aecdc91aed83432ace069e Mon Sep 17 00:00:00 2001
From: Wayne Heaney <42350981+wheaney@users.noreply.github.com>
Date: Sun, 21 Jul 2024 22:01:36 -0700
Subject: [PATCH 10/18] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index cdb8894..584e65e 100644
--- a/README.md
+++ b/README.md
@@ -17,11 +17,11 @@ Breezy GNOME is a virtual workspace solution for Linux desktops that use the GNO
### GNOME Setup
-For the best performance, ensure you have the latest graphics drivers installed for your distro.
+For the best performance, ensure you have the latest graphics drivers installed for your distro. Also, double-check that your glasses are extending your workspace and not just mirroring your primary monitor by opening up the `Displays` settings dialog and choosing the `Join` option for multiple displays.
#### Arch Linux
-Breezy GNOME is in AUR (but not pacman, yet). To install: `yay -S breezy-desktop-gnome-git`
+Breezy GNOME is in AUR (but not pacman, yet). To install: `yay -S breezy-desktop-gnome-git` and, once that succeeds, `systemctl --user enable --now xreal-air-driver.service`
#### All other distros
From f75a5f36512d98908e9c81a36c5ea6b9e710f369 Mon Sep 17 00:00:00 2001
From: Wayne Heaney <42350981+wheaney@users.noreply.github.com>
Date: Mon, 22 Jul 2024 13:22:19 -0700
Subject: [PATCH 11/18] XDG reorg (#35)
https://github.com/wheaney/breezy-desktop/issues/4
---
README.md | 4 +-
bin/breezy_gnome_setup | 2 -
bin/breezy_vulkan_setup | 19 +++-
bin/package_gnome | 29 +++---
bin/package_vulkan | 65 +++++++-----
modules/XRLinuxDriver | 2 +-
vulkan/bin/breezy_vulkan_uninstall | 85 +++++++++++++---
vulkan/bin/breezy_vulkan_verify | 42 ++++++++
vulkan/bin/setup | 152 +++++++++++++++++++++--------
vulkan/bin/verify_installation | 42 --------
10 files changed, 296 insertions(+), 146 deletions(-)
create mode 100755 vulkan/bin/breezy_vulkan_verify
delete mode 100755 vulkan/bin/verify_installation
diff --git a/README.md b/README.md
index 584e65e..adc3c33 100644
--- a/README.md
+++ b/README.md
@@ -154,9 +154,9 @@ Rerun the `breezy_vulkan_setup` script. No need to re-download this script, as i
If you wish to completely remove the installation:
* For **Breezy GNOME**:
- * If you installed *via the setup script* run the following: `~/$XDG_BIN_HOME/breezy_gnome_uninstall` or `~/.local/bin/breezy_gnome_uninstall` if the XDG variable isn't set
+ * If you installed *via the setup script* run the following: `~/.local/bin/breezy_gnome_uninstall`
* If you installed via `yay` run the following: `pacman -R breezy-desktop-gnome-git`, you may also want to uninstall the base driver with `pacman -R xr-driver-breezy-gnome-git`
-* For **Breezy Vulkan** run the following: `sudo ~/bin/breezy_vulkan_uninstall`. This won't uninstall the base driver package, follow the instructions at the end of the uninstallation to do this manually.
+* For **Breezy Vulkan** run the following: `~/.local/bin/breezy_vulkan_uninstall`. This won't uninstall the base driver package, follow the instructions at the end of the uninstallation to do this manually.
## Data Privacy Notice
diff --git a/bin/breezy_gnome_setup b/bin/breezy_gnome_setup
index 436d335..6ec8bb9 100755
--- a/bin/breezy_gnome_setup
+++ b/bin/breezy_gnome_setup
@@ -13,9 +13,7 @@ fi
start_dir=$(pwd)
-
ARCH=$(uname -m)
-echo "Building for $ARCH"
# create temp directory
tmp_dir=$(mktemp -d -t breezy-gnome-XXXXXXXXXX)
diff --git a/bin/breezy_vulkan_setup b/bin/breezy_vulkan_setup
index 637034b..464e785 100755
--- a/bin/breezy_vulkan_setup
+++ b/bin/breezy_vulkan_setup
@@ -14,17 +14,25 @@ fi
start_dir=$(pwd)
+ARCH=$(uname -m)
+if [ "$ARCH" != "x86_64" ]; then
+ echo "Breezy Vulkan only supports x86_64 currently"
+ exit 1
+fi
+
# create temp directory
tmp_dir=$(mktemp -d -t breezy-vulkan-XXXXXXXXXX)
pushd $tmp_dir > /dev/null
echo "Created temp directory: ${tmp_dir}"
-# if the first argument is "-v" then the second argument is metrics version, and the third argument is binary path
-# otherwise, if the first argument is present, it's the binary path
+binary_download_url="https://github.com/wheaney/breezy-desktop/releases/latest/download/breezyVulkan-$ARCH.tar.gz"
if [ "$1" = "-v" ]
then
metrics_version="$2"
binary_path_arg="$3"
+elif [ "$1" = "--tag" ] && [ -n "$2" ]
+then
+ binary_download_url="https://github.com/wheaney/breezy-desktop/releases/download/$2/breezyVulkan-$ARCH.tar.gz"
else
binary_path_arg="$1"
fi
@@ -32,8 +40,9 @@ fi
if [ -z "$binary_path_arg" ]
then
# download and unzip the latest driver
- echo "Downloading latest release to: ${tmp_dir}/breezyVulkan.tar.gz"
- curl -L -O https://github.com/wheaney/breezy-desktop/releases/latest/download/breezyVulkan.tar.gz
+ echo "Downloading to: ${tmp_dir}/breezyVulkan-$ARCH.tar.gz"
+ curl -L -O $binary_download_url
+ binary_path_arg="breezyVulkan-$ARCH.tar.gz"
else
if [[ "$binary_path_arg" = /* ]]; then
abs_path="$binary_path_arg"
@@ -45,7 +54,7 @@ else
fi
echo "Extracting to: ${tmp_dir}/breezy_vulkan"
-tar -xf breezyVulkan.tar.gz
+tar -xf $(basename $binary_path_arg)
pushd breezy_vulkan > /dev/null
diff --git a/bin/package_gnome b/bin/package_gnome
index b4a112b..b6c7aa3 100755
--- a/bin/package_gnome
+++ b/bin/package_gnome
@@ -23,8 +23,8 @@ PACKAGE_DIR=$GNOME_BUILD_DIR/breezy_gnome
rm -rf $PACKAGE_DIR
mkdir -p $PACKAGE_DIR
-XREAL_DRIVER_DIR=$ROOT_DIR/modules/XRLinuxDriver
-source $XREAL_DRIVER_DIR/bin/inject_ua
+XR_DRIVER_DIR=$ROOT_DIR/modules/XRLinuxDriver
+source $XR_DRIVER_DIR/bin/inject_ua
# if a custom_banner image exists, copy it over the sombrero one
if [ -e "$VULKAN_DIR/custom_banner.png" ]; then
@@ -33,36 +33,37 @@ fi
# copy vulkan setup scripts and configs
mkdir -p $PACKAGE_DIR/bin
-copy_and_inject_ua "$XREAL_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$GNOME_DIR/bin/setup" "$GNOME_DIR/bin/breezy_gnome_verify" "$GNOME_DIR/bin/breezy_gnome_uninstall"
+copy_and_inject_ua "$XR_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$GNOME_DIR/bin/setup" "$GNOME_DIR/bin/breezy_gnome_verify" "$GNOME_DIR/bin/breezy_gnome_uninstall"
-XREAL_BINARY=$XREAL_DRIVER_DIR/out/xrealAirLinuxDriver-$ARCH.tar.gz
-pushd $XREAL_DRIVER_DIR
+XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.tar.gz
-if [ ! -e "$XREAL_BINARY" ] || [ "$1" == "--rebuild-driver" ]; then
+if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" == "--rebuild-driver" ]; then
# if a file exists at custom_banner_config.yml, copy it to the xrealAirLinuxDriver directory
if [ -e "$VULKAN_DIR/custom_banner_config.yml" ]; then
- cp $VULKAN_DIR/custom_banner_config.yml $XREAL_DRIVER_DIR
+ cp $VULKAN_DIR/custom_banner_config.yml $XR_DRIVER_DIR
fi
+ pushd $XR_DRIVER_DIR
+
# strange issue where the base library produces a .so file if the build is not cleaned
rm -rf build/
docker-build/init.sh
BREEZY_DESKTOP=1 docker-build/run-build.sh $ARCH
+ popd
fi
-popd
TMP_DIR=$(mktemp -d -t breezy-gnome-XXXXXXXXXX)
pushd $TMP_DIR
-cp $XREAL_BINARY $TMP_DIR/xrealAirLinuxDriver.tar.gz
-tar -xf $TMP_DIR/xrealAirLinuxDriver.tar.gz
+cp $XR_DRIVER_BINARY $TMP_DIR/xrDriver.tar.gz
+tar -xf $TMP_DIR/xrDriver.tar.gz
-XREAL_MANIFEST_LINE=$(sha256sum driver_air_glasses/manifest)
+XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest)
popd
rm -rf $TMP_DIR
-cp $XREAL_BINARY $PACKAGE_DIR/xrealAirLinuxDriver.tar.gz
-cp $XREAL_DRIVER_DIR/bin/xreal_driver_setup $PACKAGE_DIR/bin
+cp $XR_DRIVER_BINARY $PACKAGE_DIR/xrDriver.tar.gz
+cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin
gnome/bin/package_extension
cp gnome/out/breezydesktop@xronlinux.com.shell-extension.zip $PACKAGE_DIR
@@ -78,7 +79,7 @@ cp ui/out/com.xronlinux.BreezyDesktop-$ARCH.flatpak $PACKAGE_DIR/com.xronlinux.B
# create manifest file for verifying installed file checksums against the originally packaged versions
# include any file that doesn't get modified during setup (e.g. vkBasalt.json files)
pushd $PACKAGE_DIR
-echo $XREAL_MANIFEST_LINE > manifest
+echo $XR_DRIVER_MANIFEST_LINE > manifest
echo -e "$GNOME_MANIFEST_LINE breezydesktop@xronlinux.com" >> manifest
popd
diff --git a/bin/package_vulkan b/bin/package_vulkan
index 0b70169..76d854e 100755
--- a/bin/package_vulkan
+++ b/bin/package_vulkan
@@ -3,27 +3,28 @@
# exit when any command fails
set -e
-XREAL_DRIVER_DIR=modules/XRLinuxDriver
-source $XREAL_DRIVER_DIR/bin/inject_ua
+ARCH=${ARCH:-$(uname -m)}
+echo "Building Breezy Vulkan for $ARCH"
-# check out submodules, recursively for nested ones
-git submodule update --init --recursive
+XR_DRIVER_DIR=modules/XRLinuxDriver
+source $XR_DRIVER_DIR/bin/inject_ua
VULKAN_DIR=vulkan
-VULKAN_BUILD=$VULKAN_DIR/build
-if [ ! -d "$VULKAN_BUILD" ]; then
- mkdir -p $VULKAN_BUILD
+VULKAN_BUILD_DIR=$VULKAN_DIR/build
+if [ ! -d "$VULKAN_BUILD_DIR" ]; then
+ mkdir -p $VULKAN_BUILD_DIR
else
- rm -rf $VULKAN_BUILD/*
+ rm -rf $VULKAN_BUILD_DIR/*
fi
VULKAN_MODULES=$VULKAN_DIR/modules
-PACKAGE_DIR=$VULKAN_BUILD/breezy_vulkan
+PACKAGE_DIR=$VULKAN_BUILD_DIR/breezy_vulkan
if [ ! -d "$PACKAGE_DIR" ]; then
mkdir -p $PACKAGE_DIR
else
rm -rf $PACKAGE_DIR/*
fi
+BUILD_FILE_NAME=breezyVulkan-$ARCH.tar.gz
# build vkBasalt
VKBASALT_MODULE_DIR=$VULKAN_MODULES/vkBasalt
@@ -53,41 +54,55 @@ fi
# copy vulkan setup scripts and configs
mkdir -p $PACKAGE_DIR/bin
-copy_and_inject_ua "$XREAL_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$VULKAN_DIR/bin/setup" "$VULKAN_DIR/bin/verify_installation" "$VULKAN_DIR/bin/breezy_vulkan_uninstall"
+copy_and_inject_ua "$XR_DRIVER_DIR/bin/ua.sh" "$PACKAGE_DIR/bin" "$VULKAN_DIR/bin/setup" "$VULKAN_DIR/bin/breezy_vulkan_verify" "$VULKAN_DIR/bin/breezy_vulkan_uninstall"
cp -r $VULKAN_DIR/config $PACKAGE_DIR
-# build xreal driver
-XREAL_BINARY=$XREAL_DRIVER_DIR/build/xrealAirLinuxDriver.tar.gz
+# build XR driver
+XR_DRIVER_BINARY=$XR_DRIVER_DIR/out/xrDriver-$ARCH.tar.gz
-if [ ! -e "$XREAL_BINARY" ] || [ "$1" != "--skip-module-builds" ]; then
+if [ ! -e "$XR_DRIVER_BINARY" ] || [ "$1" != "--skip-module-builds" ]; then
# if a file exists at custom_banner_config.yml, copy it to the xrealAirLinuxDriver directory
if [ -e "$VULKAN_DIR/custom_banner_config.yml" ]; then
- cp $VULKAN_DIR/custom_banner_config.yml $XREAL_DRIVER_DIR
+ cp $VULKAN_DIR/custom_banner_config.yml $XR_DRIVER_DIR
fi
- pushd $XREAL_DRIVER_DIR
+ pushd $XR_DRIVER_DIR
# strange issue where the base library produces a .so file if the build is not cleaned
rm -rf build/
- bin/package
-else
- pushd $XREAL_DRIVER_DIR
+ docker-build/init.sh
+ docker-build/run-build.sh $ARCH
+ popd
fi
-XREAL_MANIFEST_LINE=$(sha256sum build/driver_air_glasses/manifest)
-popd
+TMP_DIR=$(mktemp -d -t breezy-vulkan-XXXXXXXXXX)
+cp $XR_DRIVER_BINARY $TMP_DIR/xrDriver.tar.gz
+pushd $TMP_DIR
+tar -xf $TMP_DIR/xrDriver.tar.gz
-# copy xreal binary and setup script
-cp $XREAL_BINARY $PACKAGE_DIR
-cp $XREAL_DRIVER_DIR/bin/xreal_driver_setup $PACKAGE_DIR/bin
+XR_DRIVER_MANIFEST_LINE=$(sha256sum xr_driver/manifest)
+popd
+rm -rf $TMP_DIR
+
+# copy XR driver binary and setup script
+cp $XR_DRIVER_BINARY $PACKAGE_DIR/xrDriver.tar.gz
+cp $XR_DRIVER_DIR/bin/xr_driver_setup $PACKAGE_DIR/bin
# create manifest file for verifying installed file checksums against the originally packaged versions
# include any file that doesn't get modified during setup (e.g. vkBasalt.json files)
pushd $PACKAGE_DIR
-echo $XREAL_MANIFEST_LINE > manifest
+echo $XR_DRIVER_MANIFEST_LINE > manifest
sha256sum bin/breezy_vulkan_uninstall vkBasalt.64/libvkbasalt.so vkBasalt.32/libvkbasalt.so *.fx* *.png >> manifest
popd
# bundle everything up
-tar -zcvf $VULKAN_BUILD/breezyVulkan.tar.gz --directory $VULKAN_BUILD breezy_vulkan
\ No newline at end of file
+pushd $VULKAN_BUILD_DIR
+tar -zcvf $BUILD_FILE_NAME breezy_vulkan
+popd
+
+mkdir -p out
+if [ -e "out/$BUILD_FILE_NAME" ]; then
+ rm out/$BUILD_FILE_NAME
+fi
+cp $VULKAN_BUILD_DIR/$BUILD_FILE_NAME out
\ No newline at end of file
diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver
index 21452bc..a0bf750 160000
--- a/modules/XRLinuxDriver
+++ b/modules/XRLinuxDriver
@@ -1 +1 @@
-Subproject commit 21452bcf6a073888186448e247ed8ddca85946aa
+Subproject commit a0bf7506445d61eb62da7684f361a2435300fad0
diff --git a/vulkan/bin/breezy_vulkan_uninstall b/vulkan/bin/breezy_vulkan_uninstall
index d88eaaa..2871771 100755
--- a/vulkan/bin/breezy_vulkan_uninstall
+++ b/vulkan/bin/breezy_vulkan_uninstall
@@ -14,31 +14,88 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi
+# Get the directory of the current script
+script_dir=$(dirname "$0")
+
USER=${SUDO_USER:-$USER}
+GROUP=$(id -gn $USER)
USER_HOME=$(getent passwd $USER | cut -d: -f6)
+
+if [ -z "$XDG_DATA_HOME" ]; then
+ XDG_DATA_HOME="$USER_HOME/.local/share"
+fi
+DATA_DIR="$XDG_DATA_HOME/breezy_vulkan"
+if [ ! -d "$DATA_DIR" ]; then
+ mkdir -p $DATA_DIR
+fi
+VULKAN_DATA_DIR="$XDG_DATA_HOME/vulkan"
+XR_DRIVER_DATA_DIR="$XDG_DATA_HOME/breezy_vulkan"
+
+if [ -z "$XDG_CONFIG_HOME" ]; then
+ XDG_CONFIG_HOME="$USER_HOME/.config"
+fi
+CONFIG_DIR="$XDG_CONFIG_HOME/breezy_vulkan"
+if [ ! -d "$CONFIG_DIR" ]; then
+ mkdir -p $CONFIG_DIR
+fi
+
+if [ -z "$XDG_BIN_HOME" ]; then
+ XDG_BIN_HOME="$USER_HOME/.local/bin"
+fi
+OLD_BIN_DIR="$USER_HOME/bin"
+BIN_DIR="$XDG_BIN_HOME"
+if [ ! -d "$BIN_DIR" ]; then
+ mkdir -p $BIN_DIR
+fi
+
+if [ -z "$XDG_STATE_HOME" ]; then
+ XDG_STATE_HOME="$USER_HOME/.local/state"
+fi
+STATE_DIR="$XDG_STATE_HOME/breezy_vulkan"
+if [ ! -d "$STATE_DIR" ]; then
+ mkdir -p $STATE_DIR
+fi
+
+LIB_DIR="$USER_HOME/.local/lib"
+if [ ! -d "$LIB_DIR" ]; then
+ mkdir -p "$LIB_DIR"
+fi
+
+LIB32_DIR="$USER_HOME/.local/lib32"
+if [ ! -d "$LIB32_DIR" ]; then
+ mkdir -p "$LIB32_DIR"
+fi
+
if [ "$for_install" -eq 0 ]; then
UA_EVENT_NAME="breezy_uninstall"
UA_CLIENT_ID="BreezyVulkan"
#INJECT_UA_CALL
fi
-[ "$for_install" -eq 0 ] && echo "Removing vkBasalt binaries from $USER_HOME/.local/lib[32]/"
-rm $USER_HOME/.local/lib/libvkbasalt.so
-rm $USER_HOME/.local/lib32/libvkbasalt.so
+[ "$for_install" -eq 0 ] && echo "Removing vkBasalt binaries from $LIB_DIR[32]/"
+rm $LIB_DIR/libvkbasalt.so
+rm $LIB32_DIR/libvkbasalt.so
-[ "$for_install" -eq 0 ] && echo "Removing vkBasalt vulkan layer configs from $USER_HOME/.local/share/vulkan/implicit_layer.d/"
-rm $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.json
-rm $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.x86.json
+[ "$for_install" -eq 0 ] && echo "Removing vkBasalt vulkan layer configs from $VULKAN_DATA_DIR/implicit_layer.d/"
+rm $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.json
+rm $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.x86.json
-[ "$for_install" -eq 0 ] && echo "Removing vkBasalt and reshade directories at $USER_HOME/.config/"
-rm -rf $USER_HOME/.config/vkBasalt
-rm -rf $USER_HOME/.config/reshade
+[ "$for_install" -eq 0 ] && echo "Removing vkBasalt and reshade directories at $CONFIG_DIR/"
+rm -rf $CONFIG_DIR/vkBasalt
+rm -rf $CONFIG_DIR/reshade
-[ "$for_install" -eq 0 ] && echo "Removing scripts at $USER_HOME/.local/bin/breezy_vulkan"
-rm -rf $USER_HOME/.local/bin/breezy_vulkan
+[ "$for_install" -eq 0 ] && echo "Removing scripts at $BIN_DIR"
+rm -f $BIN_DIR/breezy_vulkan_verify
-[ "$for_install" -eq 0 ] && echo "SKIPPING xrealAirLinuxDriver uninstall to keep mouse/joystick driver functionality."
-[ "$for_install" -eq 0 ] && echo "To manually uninstall xrealAirLinuxDriver, do: \"sudo ~/bin/xreal_driver_uninstall\""
+[ "$for_install" -eq 0 ] && echo "SKIPPING xrDriver uninstall to keep mouse/joystick driver functionality."
+[ "$for_install" -eq 0 ] && echo "To manually uninstall xrDriver, do: \"sudo xr_driver_uninstall\""
# this script is self-deleting, leave this as the last command
-rm -f $USER_HOME/bin/breezy_vulkan_uninstall
\ No newline at end of file
+# remove the one we're not using first
+if [ "$script_dir" = "$OLD_BIN_DIR" ]; then
+ rm -f "$BIN_DIR/breezy_vulkan_uninstall"
+ rm -f "$OLD_BIN_DIR/breezy_vulkan_uninstall"
+else
+ rm -f "$OLD_BIN_DIR/breezy_vulkan_uninstall"
+ rm -f "$BIN_DIR/breezy_vulkan_uninstall"
+fi
\ No newline at end of file
diff --git a/vulkan/bin/breezy_vulkan_verify b/vulkan/bin/breezy_vulkan_verify
new file mode 100755
index 0000000..be901e2
--- /dev/null
+++ b/vulkan/bin/breezy_vulkan_verify
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+
+set -e
+
+# create a string to string mapping, file name to expected file location
+declare -A file_paths
+file_paths=(
+ ["bin/breezy_vulkan_uninstall"]="{bin_dir}/breezy_vulkan_uninstall"
+ ["vkBasalt.64/libvkbasalt.so"]="{lib_dir}/libvkbasalt.so"
+ ["vkBasalt.32/libvkbasalt.so"]="{lib32_dir}/libvkbasalt.so"
+ ["IMUAdjust.fx"]="{reshade_config_dir}/Shaders/IMUAdjust.fx"
+ ["ReShade.fxh"]="{reshade_config_dir}/Shaders/ReShade.fxh"
+ ["ReShadeUI.fxh"]="{reshade_config_dir}/Shaders/ReShadeUI.fxh"
+ ["Sideview.fx"]="{reshade_config_dir}/Shaders/Sideview.fx"
+ ["calibrating.png"]="{reshade_config_dir}/Textures/calibrating.png"
+ ["custom_banner.png"]="{reshade_config_dir}/Textures/custom_banner.png"
+ ["xr_driver/manifest"]="{xr_driver_data_dir}/manifest"
+)
+
+# verify the file hashes in ./manifest
+while IFS= read -r line
+do
+ # split the line into hash and filename
+ manifest_hash=$(echo $line | awk '{print $1}')
+ file=$(echo $line | awk '{print $2}')
+
+ actual_file_path=${file_paths[$file]}
+
+ # compute the SHA256 hash of the actual file
+ actual_hash=$(sha256sum $actual_file_path | awk '{print $1}')
+
+ # compare the hashes
+ if ! [ "$manifest_hash" = "$actual_hash" ]; then
+ echo "Verification failed" >&2
+ exit 1
+ fi
+done < "{data_dir}/manifest"
+
+# if our checks succeeded, run the xr_driver verify script
+{bin_dir}/xr_driver_verify > /dev/null
+
+echo "Verification succeeded"
\ No newline at end of file
diff --git a/vulkan/bin/setup b/vulkan/bin/setup
index a55476a..ab5bac4 100755
--- a/vulkan/bin/setup
+++ b/vulkan/bin/setup
@@ -6,8 +6,53 @@ set -e
# to a specific release of the code, and guarantees it will never run along-side newer or older binaries.
USER=${SUDO_USER:-$USER}
+GROUP=$(id -gn $USER)
USER_HOME=$(getent passwd $USER | cut -d: -f6)
UA_EVENT_NAME="breezy_install"
+
+if [ -z "$XDG_DATA_HOME" ]; then
+ XDG_DATA_HOME="$USER_HOME/.local/share"
+fi
+DATA_DIR="$XDG_DATA_HOME/breezy_vulkan"
+if [ ! -d "$DATA_DIR" ]; then
+ mkdir -p $DATA_DIR
+fi
+VULKAN_DATA_DIR="$XDG_DATA_HOME/vulkan"
+XR_DRIVER_DATA_DIR="$XDG_DATA_HOME/xr_driver"
+
+if [ -z "$XDG_CONFIG_HOME" ]; then
+ XDG_CONFIG_HOME="$USER_HOME/.config"
+fi
+RESHADE_CONFIG_DIR="$XDG_CONFIG_HOME/reshade"
+VKBASALT_CONFIG_DIR="$XDG_CONFIG_HOME/vkBasalt"
+
+if [ -z "$XDG_BIN_HOME" ]; then
+ XDG_BIN_HOME="$USER_HOME/.local/bin"
+fi
+OLD_BIN_DIR="$USER_HOME/bin"
+BIN_DIR="$XDG_BIN_HOME"
+if [ ! -d "$BIN_DIR" ]; then
+ mkdir -p $BIN_DIR
+fi
+
+if [ -z "$XDG_STATE_HOME" ]; then
+ XDG_STATE_HOME="$USER_HOME/.local/state"
+fi
+STATE_DIR="$XDG_STATE_HOME/breezy_vulkan"
+if [ ! -d "$STATE_DIR" ]; then
+ mkdir -p $STATE_DIR
+fi
+
+LIB_DIR="$USER_HOME/.local/lib"
+if [ ! -d "$LIB_DIR" ]; then
+ mkdir -p "$LIB_DIR"
+fi
+
+LIB32_DIR="$USER_HOME/.local/lib32"
+if [ ! -d "$LIB32_DIR" ]; then
+ mkdir -p "$LIB32_DIR"
+fi
+
if [ -e "$USER_HOME/bin/breezy_vulkan_uninstall" ]; then
echo "Cleaning up the previous installation"
@@ -17,68 +62,93 @@ if [ -e "$USER_HOME/bin/breezy_vulkan_uninstall" ]; then
UA_EVENT_NAME="breezy_update"
fi
+if [ -e "$BIN_DIR/breezy_vulkan_uninstall" ]; then
+ echo "Cleaning up the previous installation"
+
+ # ` || true` will ensure that this can't cause a failure, even with `set -e`
+ $BIN_DIR/breezy_vulkan_uninstall --for-install || true
+
+ UA_EVENT_NAME="breezy_update"
+fi
+
UA_CLIENT_ID="BreezyVulkan"
UA_EVENT_VERSION="$1"
#INJECT_UA_CALL
-echo "Copying the breezy_vulkan scripts to ${USER_HOME}/bin"
-if [ ! -d "$USER_HOME/bin" ]; then
- su -c 'mkdir -p '$USER_HOME'/bin' $USER
-fi
-cp bin/breezy_vulkan_uninstall $USER_HOME/bin
-echo "Installing vkBasalt; copying binaries, configs, and shader files to ${USER_HOME}/.local and ${USER_HOME}/.config"
+# escaping sed replace: https://stackoverflow.com/questions/407523/escape-a-string-for-a-sed-replace-pattern
+ESCAPED_BIN_DIR=$(printf '%s\n' "$BIN_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_LIB_DIR=$(printf '%s\n' "$LIB_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_LIB32_DIR=$(printf '%s\n' "$LIB32_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_RESHADE_CONFIG_DIR=$(printf '%s\n' "$RESHADE_CONFIG_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_STATE_DIR=$(printf '%s\n' "$STATE_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_DATA_DIR=$(printf '%s\n' "$DATA_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_XR_DRIVER_DATA_DIR=$(printf '%s\n' "$XR_DRIVER_DATA_DIR" | sed -e 's/[\/&]/\\&/g')
+
+echo "Copying the breezy_vulkan scripts to ${BIN_DIR} and related files to ${DATA_DIR}"
+cp bin/breezy_vulkan_uninstall $BIN_DIR
+sed -i -e "s/{bin_dir}/$ESCAPED_BIN_DIR/g" \
+ -e "s/{lib_dir}/$ESCAPED_LIB_DIR/g" \
+ -e "s/{lib32_dir}/$ESCAPED_LIB32_DIR/g" \
+ -e "s/{reshade_config_dir}/$ESCAPED_RESHADE_CONFIG_DIR/g" \
+ -e "s/{state_dir}/$ESCAPED_STATE_DIR/g" \
+ -e "s/{data_dir}/$ESCAPED_DATA_DIR/g" \
+ -e "s/{xr_driver_data_dir}/$ESCAPED_XR_DRIVER_DATA_DIR/g" \
+ bin/breezy_vulkan_verify
+cp bin/breezy_vulkan_verify $BIN_DIR
+cp manifest $DATA_DIR
+
+# keep putting this in the old location in case an older version of the script tries to find it
+cp bin/breezy_vulkan_uninstall $OLD_BIN_DIR
+
+echo "Installing vkBasalt; copying binaries, configs, and shader files"
# much of the setup below was informed by https://github.com/simons-public/steam-deck-vkbasalt-install
# copy the vkBasalt binaries and configs
-su -c 'mkdir -p '$USER_HOME'/.local/{lib,lib32,share/vulkan/implicit_layer.d}' $USER
-su -c 'mkdir -p '$USER_HOME'/.config/{vkBasalt,reshade/Shaders,reshade/Textures}' $USER
-cp vkBasalt.64/libvkbasalt.so $USER_HOME/.local/lib/
-cp vkBasalt.32/libvkbasalt.so $USER_HOME/.local/lib32/
-chown $USER:$USER $USER_HOME/.local/lib/libvkbasalt.so
-chown $USER:$USER $USER_HOME/.local/lib32/libvkbasalt.so
+mkdir -p "$VULKAN_DATA_DIR"/implicit_layer.d
+mkdir -p "$XDG_CONFIG_HOME"/{vkBasalt,reshade/Shaders,reshade/Textures}
+cp vkBasalt.64/libvkbasalt.so $LIB_DIR/
+cp vkBasalt.32/libvkbasalt.so $LIB32_DIR/
# there is only one vkBasalt.json file, use the 64-bit directory for both, copy and make replacements
if grep -q SteamOS /etc/os-release ; then
- sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib/libvkbasalt.so|" -e "s/ENABLE_VKBASALT/SteamDeck/" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.json
- sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib32/libvkbasalt.so|" -e "s/ENABLE_VKBASALT/SteamDeck/" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.x86.json
+ sed -e "s|libvkbasalt.so|${LIB_DIR}/libvkbasalt.so|" -e "s/ENABLE_VKBASALT/SteamDeck/" vkBasalt.64/vkBasalt.json > $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.json
+ sed -e "s|libvkbasalt.so|${LIB32_DIR}/libvkbasalt.so|" -e "s/ENABLE_VKBASALT/SteamDeck/" vkBasalt.64/vkBasalt.json > $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.x86.json
else
- sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib/libvkbasalt.so|" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.json
- sed -e "s|libvkbasalt.so|${USER_HOME}/.local/lib32/libvkbasalt.so|" vkBasalt.64/vkBasalt.json > $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.x86.json
+ sed -e "s|libvkbasalt.so|${LIB_DIR}/libvkbasalt.so|" vkBasalt.64/vkBasalt.json > $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.json
+ sed -e "s|libvkbasalt.so|${LIB32_DIR}/libvkbasalt.so|" vkBasalt.64/vkBasalt.json > $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.x86.json
fi
-chown $USER:$USER $USER_HOME/.local/share/vulkan/implicit_layer.d/vkBasalt.*
# copy the vkBasalt.conf file and make replacements
-sed -e "s|/path/to/reshade-shaders|${USER_HOME}/.config/reshade|" \
- -e "s|/path/to/virtual_display|${USER_HOME}/.config/reshade/Shaders/IMUAdjust.fx|" \
- -e "s|/path/to/sideview|${USER_HOME}/.config/reshade/Shaders/Sideview.fx|" \
- config/vkBasalt.conf > $USER_HOME/.config/vkBasalt/vkBasalt.conf
-chown -R $USER:$USER $USER_HOME/.config/vkBasalt
+sed -e "s|/path/to/reshade-shaders|${RESHADE_CONFIG_DIR}|" \
+ -e "s|/path/to/virtual_display|${RESHADE_CONFIG_DIR}/Shaders/IMUAdjust.fx|" \
+ -e "s|/path/to/sideview|${RESHADE_CONFIG_DIR}/Shaders/Sideview.fx|" \
+ config/vkBasalt.conf > $VKBASALT_CONFIG_DIR/vkBasalt.conf
-echo "Installing the Sombrero shaders and texture files to ${USER_HOME}/.config/reshade/{Shaders,Textures}"
-cp *.fx* $USER_HOME/.config/reshade/Shaders
-cp *.png $USER_HOME/.config/reshade/Textures
-chown -R $USER:$USER $USER_HOME/.config/reshade
+echo "Installing the Sombrero shaders and texture files to ${RESHADE_CONFIG_DIR}/{Shaders,Textures}"
+cp *.fx* $RESHADE_CONFIG_DIR/Shaders
+cp *.png $RESHADE_CONFIG_DIR/Textures
-# escaping sed replace: https://stackoverflow.com/questions/407523/escape-a-string-for-a-sed-replace-pattern
-ESCAPED_USER_HOME=$(printf '%s\n' "$USER_HOME" | sed -e 's/[\/&]/\\&/g')
+chown -R $USER:$GROUP $LIB_DIR
+chown -R $USER:$GROUP $LIB32_DIR
+chown -R $USER:$GROUP $DATA_DIR
+chown -R $USER:$GROUP $VULKAN_DATA_DIR
+chown -R $USER:$GROUP $RESHADE_CONFIG_DIR
+chown -R $USER:$GROUP $VKBASALT_CONFIG_DIR
+chown -R $USER:$GROUP $STATE_DIR
+chown -R $USER:$GROUP $BIN_DIR/breezy_vulkan_*
-echo "Copying the verification script and manifest to ${USER_HOME}/.local/bin/breezy_vulkan"
-sed -i -e "s/{user_home}/$ESCAPED_USER_HOME/g" bin/verify_installation
-if [ ! -d "$USER_HOME/.local/bin/breezy_vulkan" ]; then
- mkdir -p $USER_HOME/.local/bin/breezy_vulkan
-fi
-cp -p bin/verify_installation $USER_HOME/.local/bin/breezy_vulkan
-cp manifest $USER_HOME/.local/bin/breezy_vulkan
+# clear bash's cache of executable locations, so it can find the newly installed scripts
+hash -r
-# set up the XREAL driver using the local binary
-echo "Installing xrealAirLinuxDriver"
-echo "BEGIN - xreal_driver_setup"
+# set up the XR driver using the local binary
+echo "Installing xrDriver"
+echo "BEGIN - xr_driver_setup"
if [ -z "$1" ]
then
- bin/xreal_driver_setup $(pwd)/xrealAirLinuxDriver.tar.gz
+ bin/xr_driver_setup $(pwd)/xrDriver.tar.gz
else
- bin/xreal_driver_setup -v $1 $(pwd)/xrealAirLinuxDriver.tar.gz
+ bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz
fi
-echo "END - xreal_driver_setup"
\ No newline at end of file
+echo "END - xr_driver_setup"
\ No newline at end of file
diff --git a/vulkan/bin/verify_installation b/vulkan/bin/verify_installation
deleted file mode 100755
index 9cfcb85..0000000
--- a/vulkan/bin/verify_installation
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-# create a string to string mapping, file name to expected file location
-declare -A file_paths
-file_paths=(
- ["bin/breezy_vulkan_uninstall"]="{user_home}/bin/breezy_vulkan_uninstall"
- ["vkBasalt.64/libvkbasalt.so"]="{user_home}/.local/lib/libvkbasalt.so"
- ["vkBasalt.32/libvkbasalt.so"]="{user_home}/.local/lib32/libvkbasalt.so"
- ["IMUAdjust.fx"]="{user_home}/.config/reshade/Shaders/IMUAdjust.fx"
- ["ReShade.fxh"]="{user_home}/.config/reshade/Shaders/ReShade.fxh"
- ["ReShadeUI.fxh"]="{user_home}/.config/reshade/Shaders/ReShadeUI.fxh"
- ["Sideview.fx"]="{user_home}/.config/reshade/Shaders/Sideview.fx"
- ["calibrating.png"]="{user_home}/.config/reshade/Textures/calibrating.png"
- ["custom_banner.png"]="{user_home}/.config/reshade/Textures/custom_banner.png"
- ["build/driver_air_glasses/manifest"]="{user_home}/.local/bin/xr_driver/manifest"
-)
-
-# verify the file hashes in ./manifest
-while IFS= read -r line
-do
- # split the line into hash and filename
- manifest_hash=$(echo $line | awk '{print $1}')
- file=$(echo $line | awk '{print $2}')
-
- actual_file_path=${file_paths[$file]}
-
- # compute the SHA256 hash of the actual file
- actual_hash=$(sha256sum $actual_file_path | awk '{print $1}')
-
- # compare the hashes
- if ! [ "$manifest_hash" = "$actual_hash" ]; then
- echo "Verification failed" >&2
- exit 1
- fi
-done < "{user_home}/.local/bin/breezy_vulkan/manifest"
-
-# if our checks succeeded, run the xr_driver verify script
-{user_home}/.local/bin/xr_driver/verify_installation > /dev/null
-
-echo "Verification succeeded"
\ No newline at end of file
From fac8a15c972373e860bed1f17abcefd256bb29e1 Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Mon, 22 Jul 2024 14:44:03 -0700
Subject: [PATCH 12/18] Fix a few missed references to pre-reorg files
---
README.md | 14 +++++++-------
gnome/bin/breezy_gnome_uninstall | 4 ++--
gnome/bin/setup | 18 ++++++------------
3 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/README.md b/README.md
index adc3c33..86948ce 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,7 @@ If you don't receive a token, you can request one in the `License Details` view
#### Steam Deck via Decky Loader
-For Steam Deck users, the driver is now available via the [Decky plugin loader](https://github.com/SteamDeckHomebrew/decky-loader). Just search "xreal" in the Decky store to install and use without leaving Gaming Mode. You can now enable or disable the driver and manage other driver settings via the Decky sidebar menu.
+For Steam Deck users, the driver is now available via the [Decky plugin loader](https://github.com/SteamDeckHomebrew/decky-loader). Just search "xr" in the Decky store to install and use without leaving Gaming Mode. You can now enable or disable the driver and manage other driver settings via the Decky sidebar menu.
You may still opt to do a manual installation using the instructions below if you enter Desktop Mode.
@@ -100,13 +100,13 @@ See [XRLinuxDriver's supported devices](https://github.com/wheaney/XRLinuxDriver
### Usage
-Once installed, you'll want to make sure you've enabled the driver (`~/bin/xreal_driver_config -e`) and then you can go into whichever output mode you'd like using (`~/bin/xreal_driver_config -m`) where `-m` is for mouse mode, `-j` for joystick, `-vd` for virtual display, and `-sv` for sideview; note that these two commands can't be combined, they have to be done separately. From there, you should be able to launch any Vulkan game, plug in your glasses (at any point, not just after launching), and see a floating virtual display or a sideview screen (depending on which mode you've chosen).
+Once installed, you'll want to make sure you've enabled the driver (`xr_driver_cli -e`) and then you can go into whichever output mode you'd like using (`xr_driver_cli -m`) where `-m` is for mouse mode, `-j` for joystick, `-vd` for virtual display, and `-sv` for sideview; note that these two commands can't be combined, they have to be done separately. From there, you should be able to launch any Vulkan game, plug in your glasses (at any point, not just after launching), and see a floating virtual display or a sideview screen (depending on which mode you've chosen).
There's a wait period of 15 seconds after plugging in XREAL glasses where the screen will stay static to allow for the glasses to calibrate. Once ready, the screen will anchor to the space where you are looking.
### Configurations
-To see all the configuration options available to you, type `~/bin/xreal_driver_config` with no parameters to get the usage statement. There are some things you can't trigger from the script, like re-centering the virtual display or entering SBS mode; you can achieve these things through multi-tap or through the physical buttons on the glasses, respectively.
+To see all the configuration options available to you, type `xr_driver_cli` with no parameters to get the usage statement. There are some things you can't trigger from the script, like re-centering the virtual display or entering SBS mode; you can achieve these things through multi-tap or through the physical buttons on the glasses, respectively.
#### Multi-tap to re-center or re-calibrate
I've implemented an experimental multi-tap detection feature for screen **re-centering (2 taps)** and **re-calibrating the device (3 taps)**. To perform a multi-tap, you'll want to give decent taps on the top of the glasses. I tend to do this on the corner, right on top of the hinge. It should be a firm, sharp tap, and wait just a split second to do the second tap, as it needs to detect a slight pause in between (but it also shouldn't take more than a half a second between taps so don't wait too long).
@@ -133,18 +133,18 @@ Features currently offered:
If you donate at least $10, you should immediately receive an email (to your Ko-fi email address) with a verification token. If you don't, request it using the config script:
```bash
-~/bin/xreal_driver_config --request-token [emailAddress]
+xr_driver_cli --request-token [emailAddress]
```
Once you have a token, verify it using:
```bash
-~/bin/xreal_driver_config --verify-token [token]
-~/bin/xreal_driver_config --refresh-license
+xr_driver_cli --verify-token [token]
+xr_driver_cli --refresh-license
```
### Disabling
-To disable the floating screen effect, either disable the driver (`~/bin/xreal_driver_config -d`), unplug the glasses, or hit the `Home` key (you'll need to bind this to your controller, if on Steam Deck).
+To disable the floating screen effect, either disable the driver (`xr_driver_cli -d`), unplug the glasses, or hit the `Home` key (you'll need to bind this to your controller, if on Steam Deck).
### Updating
diff --git a/gnome/bin/breezy_gnome_uninstall b/gnome/bin/breezy_gnome_uninstall
index fbffccc..199bc03 100755
--- a/gnome/bin/breezy_gnome_uninstall
+++ b/gnome/bin/breezy_gnome_uninstall
@@ -42,9 +42,9 @@ flatpak uninstall --user --noninteractive --force-remove com.xronlinux.BreezyDe
[ "$for_install" -eq 0 ] && echo "Uninstalling XRLinuxDriver"
# if for-install
if [ "$for_install" -eq 1 ]; then
- sudo ~/bin/xreal_driver_uninstall --for-install
+ sudo ~/.local/bin/xr_driver_uninstall --for-install
else
- sudo ~/bin/xreal_driver_uninstall
+ sudo ~/.local/bin/xr_driver_uninstall
fi
diff --git a/gnome/bin/setup b/gnome/bin/setup
index d5ec9fe..617ae44 100755
--- a/gnome/bin/setup
+++ b/gnome/bin/setup
@@ -70,20 +70,14 @@ gnome-extensions install --force breezydesktop@xronlinux.com.shell-extension.zip
echo "Installing the Breezy Desktop UI Flatpak (this may take a couple minutes the first time)"
flatpak install --user --noninteractive --reinstall com.xronlinux.BreezyDesktop.flatpak
-# set up the XREAL driver using the local binary
-echo "Installing xrealAirLinuxDriver"
-echo "BEGIN - xreal_driver_setup"
+# set up the XR driver using the local binary
+echo "Installing xrDriver"
+echo "BEGIN - xr_driver_setup"
if [ -z "$1" ]
then
- sudo bin/xreal_driver_setup $(pwd)/xrealAirLinuxDriver.tar.gz
+ sudo bin/xr_driver_setup $(pwd)/xrDriver.tar.gz
else
- sudo bin/xreal_driver_setup -v $1 $(pwd)/xrealAirLinuxDriver.tar.gz
+ sudo bin/xr_driver_setup -v $1 $(pwd)/xrDriver.tar.gz
fi
-echo "END - xreal_driver_setup"
-
-echo "Enabling the driver and setting it to Breezy Desktop mode"
-$USER_HOME/bin/xreal_driver_config -e
-$USER_HOME/bin/xreal_driver_config -vd
-
-sed -i 's/virtual_display/breezy_desktop/g' $USER_HOME/.xreal_driver_config
\ No newline at end of file
+echo "END - xr_driver_setup"
\ No newline at end of file
From cad0be9698df8238c142ad89d33145e0c990f81c Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Tue, 23 Jul 2024 10:09:56 -0700
Subject: [PATCH 13/18] Pull in driver with license file fix
---
modules/XRLinuxDriver | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver
index a0bf750..95c2fbf 160000
--- a/modules/XRLinuxDriver
+++ b/modules/XRLinuxDriver
@@ -1 +1 @@
-Subproject commit a0bf7506445d61eb62da7684f361a2435300fad0
+Subproject commit 95c2fbfae235d7637b10f24c1f75bcc7d1de8142
From 22ef5645007e63ae0755ac08f22f77fbc72b2aad Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Tue, 23 Jul 2024 12:09:35 -0700
Subject: [PATCH 14/18] Pull in updated driver IPC package, add nested monitor
detection back in
---
gnome/bin/breezy_gnome_verify | 15 ++++-----------
gnome/bin/setup | 24 +++++++++++++++++++-----
gnome/src/extension.js | 3 ++-
ui/build-aux/start-breezy-desktop.sh | 8 ++++++++
ui/modules/PyXRLinuxDriverIPC | 2 +-
ui/src/main.py | 10 +++++++---
6 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/gnome/bin/breezy_gnome_verify b/gnome/bin/breezy_gnome_verify
index af525ba..ee6f9b5 100755
--- a/gnome/bin/breezy_gnome_verify
+++ b/gnome/bin/breezy_gnome_verify
@@ -2,18 +2,11 @@
set -e
-USER_HOME=$(realpath ~)
-
-if [ -z "$XDG_DATA_HOME" ]; then
- XDG_DATA_HOME="$USER_HOME/.local/share"
-fi
-DATA_DIR="$XDG_DATA_HOME/breezy_gnome"
-
# create a string to string mapping, file name to expected file location
declare -A file_paths
file_paths=(
- ["driver_air_glasses/manifest"]="$USER_HOME/.local/bin/xr_driver/manifest"
- ["breezydesktop@xronlinux.com"]="$XDG_DATA_HOME/gnome-shell/extensions/breezydesktop@xronlinux.com"
+ ["xr_driver/manifest"]="{xr_driver_data_dir}/manifest"
+ ["breezydesktop@xronlinux.com"]="{gnome_shell_data_dir}/extensions/breezydesktop@xronlinux.com"
)
# verify the file hashes in ./manifest
@@ -41,9 +34,9 @@ do
echo "Verification failed" >&2
exit 1
fi
-done < "$XDG_DATA_HOME/breezy_gnome/manifest"
+done < "{data_dir}/manifest"
# if our checks succeeded, run the xr_driver verify script
-$USER_HOME/.local/bin/xr_driver/verify_installation > /dev/null
+{bin_dir}/xr_driver_verify > /dev/null
echo "Verification succeeded"
\ No newline at end of file
diff --git a/gnome/bin/setup b/gnome/bin/setup
index 617ae44..eb4f034 100755
--- a/gnome/bin/setup
+++ b/gnome/bin/setup
@@ -17,9 +17,17 @@ check_command "gnome-extensions"
USER_HOME=$(realpath ~)
+if [ -z "$XDG_DATA_HOME" ]; then
+ XDG_DATA_HOME="$USER_HOME/.local/share"
+fi
+XR_DRIVER_DATA_DIR="$XDG_DATA_HOME/xr_driver"
+GNOME_SHELL_DATA_DIR="$XDG_DATA_HOME/gnome-shell"
+DATA_DIR="$XDG_DATA_HOME/breezy_gnome"
+
if [ -z "$XDG_BIN_HOME" ]; then
XDG_BIN_HOME="$USER_HOME/.local/bin"
fi
+BIN_DIR="$XDG_BIN_HOME"
if [ -d "$XDG_BIN_HOME" ]; then
# check ownership and permissions before doing chown and chmod
@@ -36,11 +44,6 @@ if [ -d "$XDG_BIN_HOME" ]; then
fi
fi
-if [ -z "$XDG_DATA_HOME" ]; then
- XDG_DATA_HOME="$USER_HOME/.local/share"
-fi
-DATA_DIR="$XDG_DATA_HOME/breezy_gnome"
-
UA_EVENT_NAME="breezy_gnome_install"
if [ -e "$XDG_BIN_HOME/breezy_gnome_uninstall" ]; then
echo "Cleaning up the previous installation"
@@ -55,9 +58,20 @@ UA_CLIENT_ID="BreezyGNOME"
UA_EVENT_VERSION="$1"
#INJECT_UA_CALL
+# escaping sed replace: https://stackoverflow.com/questions/407523/escape-a-string-for-a-sed-replace-pattern
+ESCAPED_BIN_DIR=$(printf '%s\n' "$BIN_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_DATA_DIR=$(printf '%s\n' "$DATA_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_XR_DRIVER_DATA_DIR=$(printf '%s\n' "$XR_DRIVER_DATA_DIR" | sed -e 's/[\/&]/\\&/g')
+ESCAPED_GNOME_SHELL_DATA_DIR=$(printf '%s\n' "$GNOME_SHELL_DATA_DIR" | sed -e 's/[\/&]/\\&/g')
+
echo "Copying the breezy_gnome scripts to ${XDG_BIN_HOME}"
mkdir -p $XDG_BIN_HOME
cp bin/breezy_gnome_uninstall $XDG_BIN_HOME
+sed -i -e "s/{bin_dir}/$ESCAPED_BIN_DIR/g" \
+ -e "s/{data_dir}/$ESCAPED_DATA_DIR/g" \
+ -e "s/{xr_driver_data_dir}/$ESCAPED_XR_DRIVER_DATA_DIR/g" \
+ -e "s/{gnome_shell_data_dir}/$ESCAPED_GNOME_SHELL_DATA_DIR/g" \
+ bin/breezy_gnome_verify
cp bin/breezy_gnome_verify $XDG_BIN_HOME
echo "Copying the manifest file to ${DATA_DIR}"
diff --git a/gnome/src/extension.js b/gnome/src/extension.js
index a7edafd..91410f7 100644
--- a/gnome/src/extension.js
+++ b/gnome/src/extension.js
@@ -21,7 +21,8 @@ const SUPPORTED_MONITOR_PRODUCTS = [
'Air',
'Air 2', // guessing this one
'Air 2 Pro',
- 'SmartGlasses' // TCL/RayNeo
+ 'SmartGlasses', // TCL/RayNeo
+ 'MetaMonitor' // nested mode dummy monitor
];
export default class BreezyDesktopExtension extends Extension {
diff --git a/ui/build-aux/start-breezy-desktop.sh b/ui/build-aux/start-breezy-desktop.sh
index b4f60b1..b82f292 100644
--- a/ui/build-aux/start-breezy-desktop.sh
+++ b/ui/build-aux/start-breezy-desktop.sh
@@ -5,6 +5,7 @@
IFS=: read -ra host_data_dirs < <(flatpak-spawn --host sh -c 'echo "$XDG_DATA_DIRS"')
IFS=: read -ra HOST_XDG_STATE_HOME < <(flatpak-spawn --host sh -c 'echo "$XDG_STATE_HOME"')
+IFS=: read -ra HOST_XDG_CONFIG_HOME < <(flatpak-spawn --host sh -c 'echo "$XDG_CONFIG_HOME"')
IFS=: read -ra HOST_XDG_BIN_HOME < <(flatpak-spawn --host sh -c 'echo "$XDG_BIN_HOME"')
IFS=: read -ra HOST_XDG_DATA_HOME < <(flatpak-spawn --host sh -c 'echo "$XDG_DATA_HOME"')
@@ -48,6 +49,12 @@ else
XDG_STATE_HOME="$(realpath ~)/.local/state"
fi
+if [[ ! -z "${HOST_XDG_CONFIG_HOME}" ]]; then
+ XDG_CONFIG_HOME="${HOST_XDG_CONFIG_HOME}"
+else
+ XDG_CONFIG_HOME="$(realpath ~)/.config"
+fi
+
if [[ ! -z "${HOST_XDG_DATA_HOME}" ]]; then
XDG_DATA_HOME="${HOST_XDG_DATA_HOME}"
else
@@ -57,5 +64,6 @@ fi
export XDG_DATA_DIRS
export XDG_BIN_HOME
export XDG_STATE_HOME
+export XDG_CONFIG_HOME
export XDG_DATA_HOME
exec breezydesktop "$@"
\ No newline at end of file
diff --git a/ui/modules/PyXRLinuxDriverIPC b/ui/modules/PyXRLinuxDriverIPC
index 34a349d..a96fdeb 160000
--- a/ui/modules/PyXRLinuxDriverIPC
+++ b/ui/modules/PyXRLinuxDriverIPC
@@ -1 +1 @@
-Subproject commit 34a349d39efc02f4b65550debd193d29d95a84f9
+Subproject commit a96fdeb1557d8cd24e73cb8e9e2559adfa46e3aa
diff --git a/ui/src/main.py b/ui/src/main.py
index 8781f21..6ab6068 100644
--- a/ui/src/main.py
+++ b/ui/src/main.py
@@ -36,8 +36,12 @@ from .statemanager import StateManager
from .window import BreezydesktopWindow
from .xrdriveripc import XRDriverIPC
-state_dir = os.path.expanduser("~/.local/state")
-log_dir = os.path.join(state_dir, 'breezy_gnome/logs/ui')
+config_home = os.environ.get('XDG_CONFIG_HOME', '~/.config')
+config_dir = os.path.expanduser(config_home)
+state_home = os.environ.get('XDG_STATE_HOME', '~/.local/state')
+state_dir = os.path.expanduser(state_home)
+breezy_state_dir = os.path.join(state_dir, 'breezy_gnome')
+log_dir = os.path.join(breezy_state_dir, 'logs/ui')
os.makedirs(log_dir, exist_ok=True)
logger = logging.getLogger('breezy_ui')
@@ -54,7 +58,7 @@ def excepthook(exc_type, exc_value, exc_traceback):
sys.excepthook = excepthook
-XRDriverIPC.set_instance(XRDriverIPC(logger))
+XRDriverIPC.set_instance(XRDriverIPC(logger, config_dir))
class BreezydesktopApplication(Adw.Application):
"""The main application singleton class."""
From f28ba2639fa03d2ffe391b9e4609e6f68b5293ae Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Tue, 23 Jul 2024 12:45:29 -0700
Subject: [PATCH 15/18] Update nested mode monitor so it uses "dummy monitor"
flag
---
gnome/src/extension.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gnome/src/extension.js b/gnome/src/extension.js
index 91410f7..f80de09 100644
--- a/gnome/src/extension.js
+++ b/gnome/src/extension.js
@@ -15,6 +15,7 @@ import { IPC_FILE_PATH, XREffect } from './xrEffect.js';
import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
+const NESTED_MONITOR_PRODUCT = 'MetaMonitor';
const SUPPORTED_MONITOR_PRODUCTS = [
'VITURE',
'nreal air',
@@ -22,7 +23,7 @@ const SUPPORTED_MONITOR_PRODUCTS = [
'Air 2', // guessing this one
'Air 2 Pro',
'SmartGlasses', // TCL/RayNeo
- 'MetaMonitor' // nested mode dummy monitor
+ NESTED_MONITOR_PRODUCT
];
export default class BreezyDesktopExtension extends Extension {
@@ -126,7 +127,8 @@ export default class BreezyDesktopExtension extends Extension {
return {
monitor: this._monitor_manager.getMonitors()[target_monitor.index],
connector: target_monitor.connector,
- refreshRate: target_monitor.refreshRate
+ refreshRate: target_monitor.refreshRate,
+ is_dummy: target_monitor.product === NESTED_MONITOR_PRODUCT
};
}
From 702692f386acf6c3743f5fac47fb649ea0b494e2 Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Tue, 23 Jul 2024 22:07:58 -0700
Subject: [PATCH 16/18] Add handling of rapid monitor updates, prevent
concurrent config updates and effect/sbs mode changes
---
gnome/src/monitormanager.js | 52 +++++++++++++++++++++++++++----------
modules/XRLinuxDriver | 2 +-
2 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/gnome/src/monitormanager.js b/gnome/src/monitormanager.js
index 1d4b98c..6079447 100644
--- a/gnome/src/monitormanager.js
+++ b/gnome/src/monitormanager.js
@@ -86,9 +86,18 @@ function getMonitorConfig(displayConfigProxy, callback) {
}
// triggers callback with true result if an an async monitor config change was triggered, false if no config change needed
-function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPrimary, useHighestRefreshRate, callback) {
+function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPrimary, useHighestRefreshRate,
+ allowConfigUpdateFn, callback) {
Globals.logger.log_debug(`monitormanager.js performOptimalModeCheck for ${connectorName}`);
+
displayConfigProxy.GetCurrentStateRemote((result, error) => {
+ if (!allowConfigUpdateFn()) {
+ // other requests are in progress, this monitor state may be stale, do nothing
+ Globals.logger.log_debug('MonitorManager performOptimalModeCheck: allowConfigUpdate is false');
+ callback(false, null);
+ return;
+ }
+
if (error) {
callback(null, `GetCurrentState failed: ${error}`);
} else {
@@ -239,7 +248,10 @@ export const MonitorManager = GObject.registerClass({
this._backendManager = null;
this._monitorProperties = null;
this._changeHookFn = null;
- this._needsConfigCheck = this.use_optimal_monitor_config;
+
+ // help prevent certain actions from taking place multiple times in the event of rapid monitor updates
+ this._configCheckRequestCount = this.use_optimal_monitor_config ? 1 : 0;
+ this._asyncRequestsCount = 0;
}
enable() {
@@ -279,36 +291,43 @@ export const MonitorManager = GObject.registerClass({
return this._monitorProperties;
}
- // returns true if a check is needed, caller should wait for the next change hook call
+ // returns true if an async check is needed, caller should wait for the next change hook call
needsOptimalModeCheck(monitorConnector) {
- Globals.logger.log_debug(`MonitorManager checkOptimalMode: ${monitorConnector}`);
+ Globals.logger.log_debug(`MonitorManager needsOptimalModeCheck: ${monitorConnector}`);
if (this._displayConfigProxy == null) {
- Globals.logger.log('MonitorManager checkOptimalMode: _displayConfigProxy not set!');
+ Globals.logger.log('MonitorManager needsOptimalModeCheck: _displayConfigProxy not set!');
return false;
}
- if (this._needsConfigCheck) {
+ let needsConfigCheck = this._configCheckRequestCount > 0;
+ if (needsConfigCheck && --this._configCheckRequestCount === 0) {
+ this._asyncRequestsCount++;
+ const allowConfigUpdateFn = (() => this._asyncRequestsCount === 1).bind(this);
performOptimalModeCheck(this._displayConfigProxy, monitorConnector, this.headset_as_primary, this.use_highest_refresh_rate, ((configChanged, error) => {
- this._needsConfigCheck = false;
+ if (--this._asyncRequestsCount > 0) {
+ Globals.logger.log_debug(`MonitorManager _on_monitors_change: ${this._asyncRequestsCount} async requests still pending, skipping change hook`);
+ return;
+ }
+
if (error) {
Globals.logger.log(`Failed to switch to optimal mode for monitor ${monitorConnector}: ${error}`);
} else {
if (configChanged) {
Globals.logger.log(`Switched to optimal mode for monitor ${monitorConnector}`);
} else if (!!this._changeHookFn) {
- Globals.logger.log_debug('MonitorManager checkOptimalMode: no config change');
+ Globals.logger.log_debug('MonitorManager needsOptimalModeCheck: no config change');
// no config change means this won't be triggered automatically, so trigger it manually
this._changeHookFn();
} else {
- Globals.logger.log('MonitorManager checkOptimalMode: can\'t trigger change hook, no hook set!');
+ Globals.logger.log('MonitorManager needsOptimalModeCheck: can\'t trigger change hook, no hook set!');
}
}
- }).bind(this));
+ }).bind(this), this._allowConfigChange.bind(this));
} else {
- Globals.logger.log_debug('MonitorManager checkOptimalMode: skipping config check');
+ Globals.logger.log_debug('MonitorManager needsOptimalModeCheck: skipping config check');
}
- return this._needsConfigCheck;
+ return needsConfigCheck;
}
_on_monitors_change() {
@@ -316,9 +335,16 @@ export const MonitorManager = GObject.registerClass({
if (this._displayConfigProxy == null) {
return;
}
- this._needsConfigCheck = this.use_optimal_monitor_config;
+ if (this.use_optimal_monitor_config) this._configCheckRequestCount++;
+ this._asyncRequestsCount++;
getMonitorConfig(this._displayConfigProxy, ((result, error) => {
+ if (--this._asyncRequestsCount > 0) {
+ Globals.logger.log_debug(`MonitorManager _on_monitors_change: ${this._asyncRequestsCount} async requests still pending, skipping change hook`);
+ return;
+ }
+
if (error) {
+ Globals.logger.log(error);
return;
}
const monitorProperties = [];
diff --git a/modules/XRLinuxDriver b/modules/XRLinuxDriver
index 95c2fbf..b0080ca 160000
--- a/modules/XRLinuxDriver
+++ b/modules/XRLinuxDriver
@@ -1 +1 @@
-Subproject commit 95c2fbfae235d7637b10f24c1f75bcc7d1de8142
+Subproject commit b0080ca844e057d31aae0e70aa6d026059ea304f
From 1b5ec1d8226d8a026a1b0c9d33e982c5cd19c889 Mon Sep 17 00:00:00 2001
From: Wayne Heaney <42350981+wheaney@users.noreply.github.com>
Date: Wed, 24 Jul 2024 10:14:52 -0700
Subject: [PATCH 17/18] Update README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 86948ce..d77ef7b 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,8 @@ For the best performance, ensure you have the latest graphics drivers installed
#### Arch Linux
+*Note: if you've previously installed Breezy GNOME using the setup script, you must uninstall it first: `~/.local/bin/breezy_gnome_uninstall`*
+
Breezy GNOME is in AUR (but not pacman, yet). To install: `yay -S breezy-desktop-gnome-git` and, once that succeeds, `systemctl --user enable --now xreal-air-driver.service`
#### All other distros
From 150f183aadad3c2af302e8cc1c85f75f08479218 Mon Sep 17 00:00:00 2001
From: wheaney <42350981+wheaney@users.noreply.github.com>
Date: Wed, 24 Jul 2024 10:59:15 -0700
Subject: [PATCH 18/18] Fix async request handling
---
gnome/src/monitormanager.js | 60 ++++++++++++++++++++++++-------------
1 file changed, 40 insertions(+), 20 deletions(-)
diff --git a/gnome/src/monitormanager.js b/gnome/src/monitormanager.js
index 6079447..48a6dee 100644
--- a/gnome/src/monitormanager.js
+++ b/gnome/src/monitormanager.js
@@ -87,7 +87,7 @@ function getMonitorConfig(displayConfigProxy, callback) {
// triggers callback with true result if an an async monitor config change was triggered, false if no config change needed
function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPrimary, useHighestRefreshRate,
- allowConfigUpdateFn, callback) {
+ callback, allowConfigUpdateFn) {
Globals.logger.log_debug(`monitormanager.js performOptimalModeCheck for ${connectorName}`);
displayConfigProxy.GetCurrentStateRemote((result, error) => {
@@ -248,10 +248,11 @@ export const MonitorManager = GObject.registerClass({
this._backendManager = null;
this._monitorProperties = null;
this._changeHookFn = null;
+ this._needsConfigCheck = this.use_optimal_monitor_config;
// help prevent certain actions from taking place multiple times in the event of rapid monitor updates
- this._configCheckRequestCount = this.use_optimal_monitor_config ? 1 : 0;
- this._asyncRequestsCount = 0;
+ this._asyncRequestsInFlight = 0;
+ this._configCheckRequestsCount = 0;
}
enable() {
@@ -299,19 +300,33 @@ export const MonitorManager = GObject.registerClass({
return false;
}
- let needsConfigCheck = this._configCheckRequestCount > 0;
- if (needsConfigCheck && --this._configCheckRequestCount === 0) {
- this._asyncRequestsCount++;
- const allowConfigUpdateFn = (() => this._asyncRequestsCount === 1).bind(this);
+ const isCheckingConfig = this._needsConfigCheck;
+ if (this._needsConfigCheck && this._asyncRequestsInFlight === 0) {
+ this._asyncRequestsInFlight++;
+
+ const configCheckCountSnapshot = this._configCheckRequestsCount;
+ const allowConfigUpdateFn = (() => {
+ // allow updates to the config if this is the only in-flight request and no more requests
+ // were made while we were waiting for the previous request to complete
+ return this._asyncRequestsInFlight === 1 && this._configCheckRequestsCount === configCheckCountSnapshot;
+ }).bind(this);
+
performOptimalModeCheck(this._displayConfigProxy, monitorConnector, this.headset_as_primary, this.use_highest_refresh_rate, ((configChanged, error) => {
- if (--this._asyncRequestsCount > 0) {
- Globals.logger.log_debug(`MonitorManager _on_monitors_change: ${this._asyncRequestsCount} async requests still pending, skipping change hook`);
+ if (--this._asyncRequestsInFlight > 0) {
+ Globals.logger.log_debug(`MonitorManager needsOptimalModeCheck: ${this._asyncRequestsInFlight} async requests still pending, skipping change hook`);
+ return;
+ } else if (this._configCheckRequestsCount !== configCheckCountSnapshot) {
+ Globals.logger.log_debug('MonitorManager needsOptimalModeCheck: config checks requested while in-flight, skipping change hook');
return;
}
if (error) {
Globals.logger.log(`Failed to switch to optimal mode for monitor ${monitorConnector}: ${error}`);
+
+ // tell the extension to proceed, this should result in another config check
+ this._changeHookFn();
} else {
+ this._needsConfigCheck = false;
if (configChanged) {
Globals.logger.log(`Switched to optimal mode for monitor ${monitorConnector}`);
} else if (!!this._changeHookFn) {
@@ -323,11 +338,13 @@ export const MonitorManager = GObject.registerClass({
Globals.logger.log('MonitorManager needsOptimalModeCheck: can\'t trigger change hook, no hook set!');
}
}
- }).bind(this), this._allowConfigChange.bind(this));
- } else {
+ }).bind(this), allowConfigUpdateFn);
+ } else if (!this._needsConfigCheck) {
Globals.logger.log_debug('MonitorManager needsOptimalModeCheck: skipping config check');
+ } else {
+ Globals.logger.log_debug(`MonitorManager needsOptimalModeCheck: skipping due to async requests ${this._asyncRequestsInFlight}`);
}
- return needsConfigCheck;
+ return isCheckingConfig;
}
_on_monitors_change() {
@@ -335,18 +352,17 @@ export const MonitorManager = GObject.registerClass({
if (this._displayConfigProxy == null) {
return;
}
- if (this.use_optimal_monitor_config) this._configCheckRequestCount++;
- this._asyncRequestsCount++;
+ if (this.use_optimal_monitor_config) {
+ this._needsConfigCheck = true;
+ this._configCheckRequestsCount++;
+ }
+ this._asyncRequestsInFlight++;
getMonitorConfig(this._displayConfigProxy, ((result, error) => {
- if (--this._asyncRequestsCount > 0) {
- Globals.logger.log_debug(`MonitorManager _on_monitors_change: ${this._asyncRequestsCount} async requests still pending, skipping change hook`);
- return;
- }
-
if (error) {
Globals.logger.log(error);
return;
}
+
const monitorProperties = [];
for (let i = 0; i < result.length; i++) {
const [monitorName, connectorName, vendor, product, serial, refreshRate] = result[i];
@@ -366,7 +382,11 @@ export const MonitorManager = GObject.registerClass({
}
this._monitorProperties = monitorProperties;
if (!!this._changeHookFn) {
- this._changeHookFn();
+ if (--this._asyncRequestsInFlight === 0) {
+ this._changeHookFn();
+ } else {
+ Globals.logger.log_debug(`MonitorManager _on_monitors_change: ${this._asyncRequestsInFlight} requests still pending, skipping change hook`);
+ }
} else {
Globals.logger.log('MonitorManager _on_monitors_change: can\'t trigger change hook, no hook set!');
}