XR for Universal Blue and Fedora Atomic Desktops
vr fedora-atomic linux
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: Compile plugins into Envision

BREAKING CHANGE: The `axr plugins` commands have been removed in favor
of the plugin manifests being compiled into Envision.

Signed-off-by: Shiloh Fen <shiloh@shilohfen.com>

matrixfurry.com 79f7bc64 8736e1a0

verified
+68 -176
+10 -176
src/atomic-xr/envision.nu
··· 4 4 const repo = "~/.local/share/atomic-xr/envision" | path expand 5 5 const envision_config_path = "~/.config/envision/envision.json" | path expand 6 6 7 + const self = path self . 8 + 7 9 use std log 8 10 use runtime.nu 9 11 ··· 31 33 mkdir ($repo | path dirname) 32 34 if ($repo | path exists) { 33 35 cd $repo 34 - git reset --hard # Reset manual patches 36 + git reset --hard # Reset patches 35 37 git switch main 36 38 git pull 37 39 } else { ··· 40 42 } 41 43 git switch --detach (git tag -l --sort=v:refname | lines | last) 42 44 43 - [ 44 - "Actions=BuildMode;" 45 - "" 46 - "[Desktop Action BuildMode]" 47 - "Exec=distrobox enter envision -- @CMD_NAME@" 48 - "Name=Launch in Build Mode" 49 - ] 50 - | str join "\n" 51 - | save -a data/org.gabmus.envision.desktop.in.in 45 + let patches = $self | path join patches envision 46 + 47 + ls $patches 48 + | get name 49 + | each {|patch| 50 + git apply $patch 51 + } 52 52 53 53 { 54 54 if (rpm -q rpmfusion-free-release | complete | get exit_code) != 0 { ··· 116 116 117 117 log info "Successfully upgraded Envision" 118 118 } 119 - 120 - export module plugins { 121 - # Register AtomicXR envision plugins 122 - export def register [] { 123 - if ($envision_config_path | path exists) { 124 - cp -f $envision_config_path $"($envision_config_path).bak" 125 - } 126 - let envision_config = try {open $envision_config_path} catch { 127 - # TODO: Create default config file instead 128 - error make { 129 - msg: "Failed to open Envision config file" 130 - label: { 131 - text: "Failed to open file" 132 - span: (metadata $envision_config_path).span 133 - } 134 - help: "You'll need to open Envision at least once before registering plugins." 135 - } 136 - } 137 - let prefix = brew --prefix | path join bin 138 - let plugins = $envision_config.plugins 139 - | merge ( 140 - plugbuild wlx-overlay-s "WlxOverlay-S" ($prefix | path join wlx-overlay-s) "--openxr" 141 - --plugins $envision_config.plugins 142 - --screenshots ["https://github.com/galister/wlx-overlay-s/raw/guide/wlx-s.png"] 143 - --icon-url "https://github.com/galister/wlx-overlay-s/raw/main/wlx-overlay-s.svg" 144 - --homepage-url "https://github.com/galister/wlx-overlay-s" 145 - ) 146 - | merge ( 147 - plugbuild motoc "Motoc" ($prefix | path join motoc) continue 148 - --plugins $envision_config.plugins 149 - --homepage-url "https://github.com/galister/motoc" 150 - --description "Monado Tracking Origin Calibrator managed by AtomicXR" 151 - ) 152 - | merge ( 153 - plugbuild oscavmgr.project-babble "oscavmgr (Project Babble)" ($prefix | path join axr) oscavmgr start babble 154 - --plugins $envision_config.plugins 155 - --homepage-url "https://github.com/galister/oscavmgr" 156 - --description "OSC Avatar Manager (Project Babble) managed by AtomicXR" 157 - --conflicts ["oscavmgr.wivrn"] 158 - ) 159 - | merge ( 160 - plugbuild oscavmgr.wivrn "oscavmgr (WiVRn)" ($prefix | path join axr) oscavmgr start wivrn 161 - --plugins $envision_config.plugins 162 - --homepage-url "https://github.com/galister/oscavmgr" 163 - --description "OSC Avatar Manager (WiVRn) managed by AtomicXR" 164 - --conflicts ["oscavmgr.project-babble"] 165 - ) 166 - 167 - $envision_config 168 - | merge {plugins: $plugins} 169 - | save -f $envision_config_path 170 - 171 - log info "Envision plugins registered or updated successfully" 172 - } 173 - 174 - # Unegister AtomicXR envision plugins 175 - export def unregister [] { 176 - if ($envision_config_path | path exists) { 177 - cp -f $envision_config_path $"($envision_config_path).bak" 178 - } 179 - let envision_config = try {open $envision_config_path} catch { 180 - error make { 181 - msg: "Failed to open Envision config file" 182 - label: { 183 - text: "Failed to open file" 184 - span: (metadata $envision_config_path).span 185 - } 186 - help: "Envision's config file doesn't seem to exist, no AtomicXR plugins are registered." 187 - } 188 - } 189 - let plugins = $envision_config.plugins 190 - | reject -o ...(get-appids "wlx-overlay-s" "motoc" "oscavmgr.project-babble" "oscavmgr.wivrn") 191 - 192 - $envision_config 193 - | merge {plugins: $plugins} 194 - | save -f $envision_config_path 195 - 196 - log info "Envision plugins unregistered successfully" 197 - } 198 - 199 - def plugbuild [ 200 - id: string 201 - name: string 202 - exec_path: path 203 - ...args 204 - --description (-d): string 205 - --author (-a): string 206 - --icon-url (-i): string 207 - --version (-v): string 208 - --full-description (-f): string 209 - --homepage-url (-h): string 210 - --screenshots (-s): list<string> = [] 211 - --dependencies (-p): list<string> = [] # End with . for absolute id 212 - --conflicts (-c): list<string> = [] # End with . for absolute id 213 - --plugins: record # Plugin list to use instead of opening the config file 214 - ]: nothing -> record { 215 - let appid = get-appid $id 216 - 217 - log debug $"Building Envision plugin: ($id)" 218 - 219 - let description = $description | default $"($name) managed by AtomicXR" 220 - let full_description = $full_description | default $description 221 - let enabled = $plugins 222 - | default ( 223 - try { 224 - open $envision_config_path 225 - | get plugins 226 - } catch { 227 - [] 228 - } 229 - ) 230 - | transpose id data 231 - | where id == $appid 232 - | if ($in | length) == 0 { 233 - false 234 - } else { 235 - $in 236 - | get 0.data.enabled 237 - } 238 - 239 - let dependencies = get-appids ...$dependencies 240 - let conflicts = get-appids ...$conflicts 241 - 242 - {$appid: { 243 - plugin: { 244 - appid: $appid 245 - name: $"AtomicXR: ($name)" 246 - author: $author 247 - icon_url: $icon_url 248 - version: $version 249 - short_description: $description 250 - description: $full_description 251 - homepage_url: $homepage_url 252 - screenshots: $screenshots 253 - exec_url: null 254 - exec_path: $exec_path 255 - args: $args 256 - env_args: null 257 - dependencies: $dependencies 258 - conflicts: $conflicts 259 - plugin_type: "Executable" 260 - } 261 - enabled: $enabled 262 - }} 263 - } 264 - 265 - # Get absolute ids from relative 266 - def get-appid [ 267 - id: string 268 - ] { 269 - if $id ends-with "." { 270 - $id | str substring 0..-2 271 - } else { 272 - $"cc.dwagon.atomic-xr.($id)" 273 - } 274 - } 275 - 276 - def get-appids [ 277 - ...ids: string 278 - ] { 279 - $ids 280 - | each {|e| 281 - get-appid $e 282 - } 283 - } 284 - }
+25
src/atomic-xr/patches/envision/0001-Add-build-mode-to-desktop-entry.patch
··· 1 + From 9e389aa1998258ab9ffa12052ca83225b03cf6f1 Mon Sep 17 00:00:00 2001 2 + From: Shiloh Fen <shiloh@shilohfen.com> 3 + Date: Fri, 5 Sep 2025 13:38:33 -0500 4 + Subject: [PATCH] Add build mode to desktop entry 5 + 6 + --- 7 + data/org.gabmus.envision.desktop.in.in | 5 +++++ 8 + 1 file changed, 5 insertions(+) 9 + 10 + diff --git a/data/org.gabmus.envision.desktop.in.in b/data/org.gabmus.envision.desktop.in.in 11 + index 31ac287..394ff19 100644 12 + --- a/data/org.gabmus.envision.desktop.in.in 13 + +++ b/data/org.gabmus.envision.desktop.in.in 14 + @@ -12,3 +12,8 @@ Keywords=vr;virtual;reality;monado; 15 + Icon=@APP_ID@ 16 + StartupNotify=true 17 + X-GNOME-UsesNotifications=true 18 + +Actions=BuildMode; 19 + + 20 + +[Desktop Action BuildMode] 21 + +Exec=distrobox enter envision -- @CMD_NAME@ 22 + +Name=Launch in Build Mode 23 + -- 24 + 2.51.0 25 +
+33
src/atomic-xr/patches/envision/0002-Replace-plugin-manifests.patch
··· 1 + From 4e936f6b882320dd9f835ef7bd5eb85a7ff1935f Mon Sep 17 00:00:00 2001 2 + From: Shiloh Fen <shiloh@shilohfen.com> 3 + Date: Fri, 5 Sep 2025 13:45:50 -0500 4 + Subject: [PATCH] Replace plugin manifests 5 + 6 + --- 7 + src/ui/plugins/mod.rs | 10 ++++++---- 8 + 1 file changed, 6 insertions(+), 4 deletions(-) 9 + 10 + diff --git a/src/ui/plugins/mod.rs b/src/ui/plugins/mod.rs 11 + index cb18440..60dde17 100644 12 + --- a/src/ui/plugins/mod.rs 13 + +++ b/src/ui/plugins/mod.rs 14 + @@ -163,10 +163,12 @@ impl Plugin { 15 + 16 + /// urls to manifest json files representing plugins. 17 + /// each manifest should be json and the link should always point to the latest version 18 + -const MANIFESTS: [&str;3] = [ 19 + - "https://github.com/galister/wlx-overlay-s/raw/refs/heads/meta/com.github.galister.wlx-overlay-s.json", 20 + - "https://github.com/StardustXR/telescope/raw/refs/heads/main/envision/org.stardustxr.telescope.json", 21 + - "https://github.com/olekolek1000/wayvr-dashboard/raw/refs/heads/meta/dev.oo8.wayvr_dashboard.json", 22 + +const MANIFESTS: [&str;5] = [ 23 + + "https://tangled.sh/@matrixfurry.com/atomic-xr/raw/main/data/envision-plugins/manifest/wlx-overlay-s.json", 24 + + "https://tangled.sh/@matrixfurry.com/atomic-xr/raw/main/data/envision-plugins/manifest/wayvr-dashboard.json", 25 + + "https://tangled.sh/@matrixfurry.com/atomic-xr/raw/main/data/envision-plugins/manifest/motoc.json", 26 + + "https://tangled.sh/@matrixfurry.com/atomic-xr/raw/main/data/envision-plugins/manifest/oscavmgr.openxr.json", 27 + + "https://tangled.sh/@matrixfurry.com/atomic-xr/raw/main/data/envision-plugins/manifest/oscavmgr.babble.json", 28 + ]; 29 + 30 + pub async fn refresh_plugins() -> anyhow::Result<Vec<anyhow::Result<Plugin>>> { 31 + -- 32 + 2.51.0 33 +