diff --git a/README.md b/README.md index 1754a7f..70ceded 100644 --- a/README.md +++ b/README.md @@ -22,15 +22,16 @@ For the best performance, ensure you have the latest graphics drivers installed #### Multi-display (Beta) +**Note: an [AUR installation](#arch-linux) is also available for Arch users** + 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: `~/Downloads/breezy_gnome_setup` 3. Log out and back in, then proceed to [usage](#breezy-gnome-usage). #### Arch Linux -**Note: for now only the legacy/single-screen build is in AUR.** - Breezy GNOME is in AUR (but not pacman, yet). To install, run these commands from a terminal: + 1. If you've previously installed Breezy GNOME using the setup script, you must uninstall it first with `breezy_gnome_uninstall` 2. `yay -S breezy-desktop-gnome-git` 3. `systemctl --user enable --now xr-driver.service` diff --git a/VERSION b/VERSION index a14da29..a6e7bcb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.16 +2.0.17 diff --git a/gnome/bin/breezy_gnome_uninstall b/gnome/bin/breezy_gnome_uninstall index 004458c..16d8936 100755 --- a/gnome/bin/breezy_gnome_uninstall +++ b/gnome/bin/breezy_gnome_uninstall @@ -42,13 +42,15 @@ rm -f $XDG_DATA_HOME/applications/com.xronlinux.BreezyDesktop.desktop rm -f $XDG_DATA_HOME/icons/hicolor/*/apps/com.xronlinux.BreezyDesktop.png rm -f $XDG_DATA_HOME/locale/*/LC_MESSAGES/breezydesktop.mo rm -f $XDG_BIN_HOME/breezydesktop +rm -f $XDG_BIN_HOME/virtualdisplay -[ "$for_install" -eq 0 ] && echo "Uninstalling XRLinuxDriver" -# if for-install -if [ "$for_install" -eq 1 ]; then - sudo ~/.local/bin/xr_driver_uninstall --for-install -else - sudo ~/.local/bin/xr_driver_uninstall +if [ -e "$XDG_BIN_HOME/xr_driver_uninstall" ]; then + [ "$for_install" -eq 0 ] && echo "Uninstalling XRLinuxDriver" + if [ "$for_install" -eq 1 ]; then + sudo $XDG_BIN_HOME/xr_driver_uninstall --for-install + else + sudo $XDG_BIN_HOME/xr_driver_uninstall + fi fi diff --git a/gnome/bin/setup b/gnome/bin/setup index c730e02..fe9dd2b 100755 --- a/gnome/bin/setup +++ b/gnome/bin/setup @@ -22,14 +22,14 @@ check_command "python" "python3" PYTHON_GI_CHECK="import gi; gi.require_version('Gtk', '4.0'); gi.require_version('Adw', '1'); gi.require_version('Gio', '2.0'); gi.require_version('GLib', '2.0'); gi.require_version('GObject', '2.0'); gi.require_version('Gst', '1.0'); from gi.repository import Gtk, Adw, Gio, GLib, GObject, Gst" if ! { python3 -c "$PYTHON_GI_CHECK" 2>/dev/null || python -c "$PYTHON_GI_CHECK" 2>/dev/null; }; then - printf "\033[1;31mERROR:\033[0m Python GObject libraries are missing\n" - printf "Please install the required Python GObject dependencies: GTK4, libadwaita, and GStreamer libraries:\n" - printf "If you're using a Python installation from a package manager, you may need to install the following packages:\n" - printf "\tFor Debian/Ubuntu: sudo apt install python3-gi gir1.2-gtk-4.0 libadwaita-1-0 gir1.2-adw-1 gir1.2-glib-2.0 gir1.2-gobject-2.0 gir1.2-gstreamer-1.0\n" - printf "\tFor Fedora: sudo dnf install python3-gobject python3-gstreamer1 gtk4 libadwaita\n" - printf "\tFor Arch Linux: sudo pacman -S python-gobject gst-python gtk4 libadwaita\n" - printf "\nIf you continue to have issues, rerun the setup with BREEZY_IGNORE_PYTHON_ERRORS=1 to skip this check.\n\n" if [ -z "$BREEZY_IGNORE_PYTHON_ERRORS" ]; then + printf "\033[1;31mERROR:\033[0m Python GObject libraries are missing\n" + printf "Please install the required Python GObject dependencies: GTK4, libadwaita, and GStreamer libraries:\n" + printf "If you're using a Python installation from a package manager, you may need to install the following packages:\n" + printf "\tFor Debian/Ubuntu: sudo apt install python3-gi gir1.2-gtk-4.0 libadwaita-1-0 gir1.2-adw-1 gir1.2-glib-2.0 gir1.2-gobject-2.0 gir1.2-gstreamer-1.0\n" + printf "\tFor Fedora: sudo dnf install python3-gobject python3-gstreamer1 gtk4 libadwaita\n" + printf "\tFor Arch Linux: sudo pacman -S python-gobject gst-python gtk4 libadwaita\n" + printf "\nIf you continue to have issues, rerun the setup with BREEZY_IGNORE_PYTHON_ERRORS=1 to skip this check.\n\n" exit 1 else printf "\033[1;33mWARNING:\033[0m Ignoring Python dependency failures. " diff --git a/gnome/src/virtualdisplaysactor.js b/gnome/src/virtualdisplaysactor.js index ea42d6f..92a191b 100644 --- a/gnome/src/virtualdisplaysactor.js +++ b/gnome/src/virtualdisplaysactor.js @@ -42,10 +42,12 @@ const UNFOCUS_THRESHOLD = 1.1 / 2.0; * @param {number} currentFocusedIndex - Index of the currently focused monitor * @param {number} focusedMonitorDistance - Distance to the focused monitor, < 1.0 if zoomed in * @param {boolean} smoothFollowEnabled - If true, always keep the current monitor in focus or choose the closest + * @param {boolean} smoothFollowEnabled - If true, always keep the current monitor in focus or choose the closest * @param {Object} fovDetails - Contains reference widthPixels, heightPixels, horizontal and vertical radians, and pixel distance to the center of the screen * @param {Object[]} monitorsDetails - Contains x, y, width, height (coordinates from top-left) for each monitor * @returns {number} Index of the closest vector, if it surpasses the previous closest index by a certain margin, otherwise the previous index */ +function findFocusedMonitor(quaternion, monitorVectors, currentFocusedIndex, focusedMonitorDistance, smoothFollowEnabled, fovDetails, monitorsDetails) { function findFocusedMonitor(quaternion, monitorVectors, currentFocusedIndex, focusedMonitorDistance, smoothFollowEnabled, fovDetails, monitorsDetails) { const lookVector = [1.0, 0.0, 0.0]; // NWU vector pointing to the center of the screen const rotatedLookVector = applyQuaternionToVector(lookVector, quaternion); diff --git a/ui/po/de.po b/ui/po/de.po index c73987a..c0f8aae 100644 --- a/ui/po/de.po +++ b/ui/po/de.po @@ -23,57 +23,56 @@ msgid "" "display." msgstr "" "Schaltet Ihre Brille in den Side-by-Side-Modus und verdoppelt die Breite des " -"Displays." +"Bildschirms." #: src/connecteddevice.py:30 msgid "This feature is not currently supported for your device." msgstr "Diese Funktion wird von Ihrem Gerät derzeit nicht unterstützt." #: src/connecteddevice.py:145 -#, fuzzy msgid "Set Focused Display Distance" -msgstr "Display-Entfernung" +msgstr "Setze fokussierte Bildschirmentfernung" #: src/connecteddevice.py:146 msgid "Use a closer value so the display zooms in when you look at it." -msgstr "" +msgstr "Nutze einen Näher Wert um den Bildschirm zu vergößern, " +"wenn der Bildschirm angesehen wird." #: src/connecteddevice.py:153 -#, fuzzy msgid "Set All Displays Distance" -msgstr "Display-Entfernung" +msgstr "Setze alle Bildschirmentfernungen" #: src/connecteddevice.py:154 msgid "Use a farther value so the displays are zoomed out when you look away." -msgstr "" +msgstr "Nutze einen Entfernter Wert um den Bildschirm zu verkleinern, wenn diese nicht angesehen werden." #: src/connecteddevice.py:270 msgid "" "Unable to add virtual displays on this machine. Wayland and xdg-desktop-" "portal are required." msgstr "" +"Virtuelle Bildschirme können nicht hinzugefügt werden." +"Wayland und xdg-desktop-portal werden benötigt" #: src/connecteddevice.py:304 -#, fuzzy msgid "Focused display" -msgstr "Display-Entfernung" +msgstr "Fokussierter Bildschirm" #: src/connecteddevice.py:310 -#, fuzzy msgid "All displays" -msgstr "Gebogenes Display" +msgstr "Gebogene Bildschirm" #: src/displaydistancedialogcontent.py:41 msgid "closer" -msgstr "" +msgstr "Näher" #: src/displaydistancedialogcontent.py:45 msgid "fullscreen" -msgstr "" +msgstr "Vollbild" #: src/displaydistancedialogcontent.py:48 msgid "farther" -msgstr "" +msgstr "Entfernter" #: src/licensedialogcontent.py:63 msgid "Paid Tier Status" @@ -222,63 +221,64 @@ msgid "" "section.\n" " " msgstr "" +"Bewege automatisch einen Bildschirm näher, wenn Sie ihn ansehen.\n" +"Setzen Sie Ihren bevorzugten fokussierten und nicht fokussierten Abstand " +"im Anpassungen Bereich.\n" +" " #: src/gtk/connected-device.ui:70 msgid "Follow mode" msgstr "Folgemodus" #: src/gtk/connected-device.ui:71 -#, fuzzy msgid "Keep the focused display near the center of your view." -msgstr "Halten Sie das virtuelle Display Nahe der Mitte Ihres Blickfelds." +msgstr "Halten Sie den virtuellen Bildschirm Nahe der Mitte Ihres Blickfelds." #: src/gtk/connected-device.ui:93 src/gtk/no-device.ui:34 msgid "Disable physical displays" -msgstr "" +msgstr "Physische Bildschirme deaktivieren" #: src/gtk/connected-device.ui:94 src/gtk/no-device.ui:35 msgid "" "Automatically disable all physical displays when the XR effect is enabled." msgstr "" +"Deaktiviere automatisch alle physikalischen Bildschirme, wenn der XR Effekt aktiviert ist." #: src/gtk/connected-device.ui:104 -#, fuzzy msgid "Virtual displays" -msgstr "Gebogenes Display" +msgstr "Virtuelle Bildschirme" #: src/gtk/connected-device.ui:120 msgid "1080p" -msgstr "" +msgstr "1080p" #: src/gtk/connected-device.ui:121 msgid "1440p" -msgstr "" +msgstr "1440p" #: src/gtk/connected-device.ui:122 msgid "Add custom" -msgstr "" +msgstr "Eigene Auflösung hinzufügen" #: src/gtk/connected-device.ui:136 msgid "Remove custom resolution" -msgstr "" +msgstr "Eigene Auflösung entfernen" #: src/gtk/connected-device.ui:156 -#, fuzzy msgid "Rearrange displays" -msgstr "Gebogenes Display" +msgstr "Bildschirme neu anordnen" #: src/gtk/connected-device.ui:174 msgid "Adjustments" msgstr "Einstellungen" #: src/gtk/connected-device.ui:178 -#, fuzzy msgid "Display distances" -msgstr "Display-Entfernung" +msgstr "Bildschirmentfernung" #: src/gtk/connected-device.ui:179 msgid "Set how close you want displays to appear." -msgstr "" +msgstr "Stelle ein, wie nah Ihre Bildschirme erscheinen sollen." #: src/gtk/connected-device.ui:200 src/gtk/connected-device.ui:221 #: src/gtk/connected-device.ui:413 src/gtk/connected-device.ui:442 @@ -293,78 +293,77 @@ msgstr "Folgemodus-Schwelle" #: src/gtk/connected-device.ui:235 msgid "How far away you can look before the display follows." -msgstr "Wie weit Sie wegschauen können, bevor das Display folgt." +msgstr "Wie weit Sie wegschauen können, bevor der Bildschirm folgt." #: src/gtk/connected-device.ui:258 -#, fuzzy msgid "Display angling" -msgstr "Display-Größe" +msgstr "Bildschirmgröße" #: src/gtk/connected-device.ui:259 msgid "" "When there are multiple displays, choose how they should angle towards you." msgstr "" +"Stelle ein, wie mehrere Bildschirme angewinkelt werden sollen." #: src/gtk/connected-device.ui:273 msgid "Automatic" -msgstr "" +msgstr "Automatisch" #: src/gtk/connected-device.ui:274 msgid "Side-angled" -msgstr "" +msgstr "Seitlich gewinkelt" #: src/gtk/connected-device.ui:275 msgid "Top-angled" -msgstr "" +msgstr "Oben gewinkelt" #: src/gtk/connected-device.ui:276 msgid "Flat" -msgstr "" +msgstr "Flach" #: src/gtk/connected-device.ui:286 -#, fuzzy msgid "Display spacing" -msgstr "Display-Größe" +msgstr "Bildschirmgröße" #: src/gtk/connected-device.ui:287 msgid "Put empty space between displays, when there are multiple." -msgstr "" +msgstr "Setze einen leeren Bereich zwischen Bildschirme, wenn mehrere vorhanden sind." #: src/gtk/connected-device.ui:317 msgid "Viewport horizontal offset" -msgstr "" +msgstr "Horizontaler Anzeigebereich Ausgleich" #: src/gtk/connected-device.ui:318 msgid "Move the viewport to the left or right of its default position." -msgstr "" +msgstr "Bewege den Anzeigebreich nach links oder rechts der Anfangsposition." #: src/gtk/connected-device.ui:335 msgid "left" -msgstr "" +msgstr "Links" #: src/gtk/connected-device.ui:337 src/gtk/connected-device.ui:367 msgid "center" -msgstr "" +msgstr "Mitte" #: src/gtk/connected-device.ui:339 msgid "right" -msgstr "" +msgstr "Rechts" #: src/gtk/connected-device.ui:347 msgid "Viewport vertical offset" -msgstr "" +msgstr "Vertikaler Anzeigebereich Ausgleich" #: src/gtk/connected-device.ui:348 msgid "Move the viewport up or down from its default position." -msgstr "" +msgstr "Bewege den Anzeigebreich nach oberhalb oder unterhalb der Anfangsposition." #: src/gtk/connected-device.ui:365 msgid "down" -msgstr "" +msgstr "Unten" #: src/gtk/connected-device.ui:369 msgid "up" -msgstr "" +msgstr "Oben" #: src/gtk/connected-device.ui:384 src/gtk/connected-device.ui:390 msgid "Keyboard Shortcuts" @@ -385,19 +384,17 @@ msgstr "" #: src/gtk/connected-device.ui:422 msgid "Re-center display shortcut" -msgstr "Display-Zentrierung-Tastenkombination" +msgstr "Bildschirm-Zentrierung-Tastenkombination" #: src/gtk/connected-device.ui:423 msgid "Pin the virtual display to the current position." -msgstr "Heften Sie das virtuelle Display an die aktuelle Position an." +msgstr "Heften Sie den virtuellen Bildschirm an die aktuelle Position an." #: src/gtk/connected-device.ui:451 -#, fuzzy msgid "Toggle zoom on focus shortcut" msgstr "Folgemodus-Tastenkombination umschalten" #: src/gtk/connected-device.ui:452 -#, fuzzy msgid "Quickly toggle zoom on focus mode." msgstr "Schnell den Folgemodus wechseln." @@ -411,11 +408,11 @@ msgstr "Schnell den Folgemodus wechseln." #: src/gtk/connected-device.ui:509 msgid "Summon mouse cursor shortcut" -msgstr "" +msgstr "Mauszeigerazeigenkürzel" #: src/gtk/connected-device.ui:510 msgid "Bring the mouse cursor to the center of the focused display." -msgstr "" +msgstr "Bewege den Mauszeiger in die Mitte des fokussierten Bildschirms." #: src/gtk/connected-device.ui:545 src/gtk/connected-device.ui:555 msgid "Advanced Settings" @@ -423,14 +420,14 @@ msgstr "Erweiterte Einstellungen" #: src/gtk/connected-device.ui:559 msgid "Find optimal display config" -msgstr "Optimale Display-Konfiguration finden" +msgstr "Optimale Bildschirm-Konfiguration finden" #: src/gtk/connected-device.ui:560 msgid "" "Automatically modify the glasses display configuration for maximum " "resolution and best scaling when plugged in." msgstr "" -"Ändern Sie die Display-Konfiguration der Brille automatisch zur maximalen " +"Ändern Sie die Bildschirmkonfiguration der Brille automatisch zur maximalen " "Auflösung und besten Skalierung, wenn sie angeschlossen ist." #: src/gtk/connected-device.ui:570 @@ -445,69 +442,70 @@ msgstr "" #: src/gtk/connected-device.ui:581 msgid "Center on glasses' display" -msgstr "" +msgstr "Zentriere auf den Brillenbildschirm" #: src/gtk/connected-device.ui:582 msgid "" "Center the viewport on the glasses' display, even if the display is not in " "the middle." msgstr "" +"Zentriere den Anzeigebereich auf den Brillenbildschirm, selbst wenn der Bildschirm " +"nicht mittig ist." #: src/gtk/connected-device.ui:592 msgid "Always primary display" -msgstr "Immer primäres Display" +msgstr "Immer primärer Bildschirm" #: src/gtk/connected-device.ui:593 msgid "Automatically set the glasses as the primary display when plugged in." msgstr "" -"Setzen Sie die Brille automatisch als primäres Display, wenn sie " +"Setzen Sie die Brille automatisch als primären Bildschirm, wenn sie " "angeschlossen ist." #: src/gtk/connected-device.ui:603 -#, fuzzy msgid "Remove virtual displays on disable" -msgstr "Gebogenes Display" +msgstr "Gebogener Bildschirm" #: src/gtk/connected-device.ui:604 msgid "Automatically remove virtual displays when the XR effect is disabled." -msgstr "" +msgstr "Entferne virtuelle Bildschirme automatisch, wenn der XR Effekt deaktiviert ist." #: src/gtk/connected-device.ui:614 msgid "Enable multi-tap detection" -msgstr "" +msgstr "Aktiviere Multi Tap Erkennung" #: src/gtk/connected-device.ui:615 msgid "Enables double-tap to recenter and triple-tap to recalibrate." -msgstr "" +msgstr "Aktviert die Doppelberührung zum rezentrieren und Dreifach-" +"berührung zum Kalibrieren." #: src/gtk/connected-device.ui:625 -#, fuzzy msgid "All displays follow mode" -msgstr "Gebogenes Display" +msgstr "Gebogener Bildschirm" #: src/gtk/connected-device.ui:626 msgid "Follow mode moves all displays, not just the focused one." -msgstr "" +msgstr "Folgemodus bewegt alle Bildschirme, nicht nur den fokussierten" #: src/gtk/connected-device.ui:642 msgid "Follow mode movement tracking" -msgstr "" +msgstr "Folgemodus Bewegungstracking" #: src/gtk/connected-device.ui:643 msgid "Choose which movements should be tracked in follow mode." -msgstr "" +msgstr "Setzen Sie, welchen Bewegungen der Folgemodus folgen soll." #: src/gtk/connected-device.ui:658 msgid "Horizontal" -msgstr "" +msgstr "Horizontal" #: src/gtk/connected-device.ui:678 msgid "Vertical" -msgstr "" +msgstr "Vertikal" #: src/gtk/connected-device.ui:698 msgid "Tilt/roll" -msgstr "" +msgstr "Neigen/Rollen" #: src/gtk/connected-device.ui:716 msgid "Movement look-ahead" @@ -521,7 +519,7 @@ msgid "" msgstr "" "Wirkt Eingabeverzögerungen entgegen, indem die Kopfverfolgungsposition vor " "der Renderzeit vorhergesagt wird. Bleiben Sie bei den Standardeinstellungen, " -"es sei denn, das virtuelle Display hängt hinter Ihren Kopfbewegungen " +"es sei denn, der virtuelle Bildschirm hängt hinter Ihren Kopfbewegungen " "hinterher, springt vor oder ist sehr wackelig." #: src/gtk/connected-device.ui:735 @@ -534,31 +532,31 @@ msgstr "Textskalierung" #: src/gtk/connected-device.ui:748 msgid "Scaling text below 1.0 will simulate a higher resolution display" -msgstr "Text unter 1.0 skalieren simuliert ein höher aufgelöstes Display" +msgstr "Text unter 1.0 skalieren simuliert einen höher aufgelösten Bildschirm" #: src/gtk/custom-resolution-dialog-content.ui:9 msgid "Width" -msgstr "" +msgstr "Breite" #: src/gtk/custom-resolution-dialog-content.ui:42 msgid "Height" -msgstr "" +msgstr "Höhe" #: src/gtk/custom-resolution-dialog.ui:5 msgid "Add a Custom Resolution" -msgstr "" +msgstr "Eigene Auflösung hinzufügen" #: src/gtk/custom-resolution-dialog.ui:10 msgid "Add" -msgstr "" +msgstr "Hinzufügen" #: src/gtk/display-distance-dialog.ui:9 msgid "Show full range" -msgstr "" +msgstr "Gesamtes Spektrum anzeigen" #: src/gtk/display-distance-dialog.ui:18 msgid "Done" -msgstr "" +msgstr "Fertig" #: src/gtk/failed-verification.ui:13 msgid "Breezy Desktop GNOME invalid setup" @@ -775,4 +773,4 @@ msgstr "Über BreezyDesktop" #~ msgstr "Im Breitbildmodus starten" #~ msgid "Widescreen mode is not supported for all glasses." -#~ msgstr "Breitbildmodus wird nicht für alle Gläsern unterstützt" +#~ msgstr "Breitbildmodus wird nicht für alle Gläsern unterstützt" \ No newline at end of file diff --git a/ui/src/breezydesktop.in b/ui/src/breezydesktop.in index 2729644..b23c408 100755 --- a/ui/src/breezydesktop.in +++ b/ui/src/breezydesktop.in @@ -21,6 +21,10 @@ import os import sys + +lib_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib') +sys.path.insert(0, lib_dir) + import signal import locale import gettext diff --git a/ui/src/main.py b/ui/src/main.py index e96cdcf..d12bbc8 100644 --- a/ui/src/main.py +++ b/ui/src/main.py @@ -19,10 +19,6 @@ import os import sys - -lib_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib') -sys.path.insert(0, lib_dir) - import gi import logging import argparse diff --git a/ui/src/virtualdisplay.py b/ui/src/virtualdisplay.py index 64eb478..4ffd3f2 100644 --- a/ui/src/virtualdisplay.py +++ b/ui/src/virtualdisplay.py @@ -4,7 +4,7 @@ import argparse import logging import sys import signal -from .lib import pydbus +import pydbus import gi import time