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

Configure Feed

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

Install applications from homebrew

Ref #23

Shiloh Fen 687ee6b8 b60e2641

+55 -76
+26 -62
src/atomic-xr/applications.nu
··· 125 125 } 126 126 } 127 127 128 + def brewed [application: string] { 129 + (brew ls $application | complete).exit_code == 0 130 + } 131 + 132 + def install-not-brewed [application: string] { 133 + if not (brewed $application) { 134 + brew install $application 135 + } 136 + } 137 + 138 + def uninstall-brewed [application: string] { 139 + if (brewed $application) { 140 + brew uninstall $application 141 + } 142 + } 143 + 128 144 export def "uninstall envision" [] { 129 145 rm -f ~/.local/bin/envision ~/.local/share/applications/org.gabmus.envision.Devel.desktop ~/.local/share/applications/org.gabmus.envision.Devel.desktop ~/.local/share/bin/envision 130 146 } 131 147 132 148 export def "install wlx-overlay-s" [] { 133 - pull-or-clone wlx-overlay-s "https://github.com/galister/wlx-overlay-s.git" main 134 - cd ($repos | path join wlx-overlay-s) 135 - 136 - container-exec { 137 - [ 138 - rust-alsa-devel 139 - rust-libspa-devel 140 - libshaderc-devel 141 - cargo 142 - openxr-devel 143 - ] | sudo dnf install -y ...$in 144 - cargo build --release --no-default-features --features=openxr,wayland,pipewire,osc,wayvr # Build without OpenVR support 145 - } 146 - ln -sf ("target/release/wlx-overlay-s" | path expand) ~/.local/bin/ 149 + install-not-brewed wlx-overlay-s 147 150 } 148 151 149 152 export def "uninstall wlx-overlay-s" [] { 150 - rm -f ~/.local/bin/wlx-overlay-s 153 + uninstall-brewed wlx-overlay-s 151 154 } 152 155 153 156 export def "install wayvr-dashboard" [] { 154 - pull-or-clone wayvr-dashboard "https://github.com/olekolek1000/wayvr-dashboard.git" master 155 - cd ($repos | path join wayvr-dashboard) 156 - 157 - container-exec { 158 - [ 159 - npm 160 - libsoup-devel 161 - javascriptcoregtk4.1-devel 162 - webkit2gtk4.1-devel 163 - ] | sudo dnf install -y ...$in 164 - npm install 165 - npm run tauri build 166 - } 167 - ln -sf ("src-tauri/target/release/wayvr-dashboard" | path expand) ~/.local/bin/ 157 + install-not-brewed wayvr-dashboard 168 158 } 169 159 170 160 export def "uninstall wayvr-dashboard" [] { 171 - rm -f ~/.local/bin/wayvr-dashboard 161 + uninstall-brewed wayr-dashboard 172 162 } 173 163 174 164 export def "install motoc" [] { 175 - pull-or-clone motoc https://github.com/galister/motoc.git main 176 - cd ($repos | path join motoc) 177 - 178 - container-exec {cargo build --release} 179 - ln -sf ("target/release/motoc" | path expand) ~/.local/bin/ 165 + install-not-brewed motoc 180 166 } 181 167 182 168 export def "uninstall motoc" [] { 183 - rm -f ~/.local/bin/motoc 169 + uninstall-brewed motoc 184 170 } 185 171 186 172 export def "install oscavmgr" [] { 187 - pull-or-clone oscavmgr https://github.com/galister/oscavmgr.git main 188 - cd ($repos | path join oscavmgr) 189 - 190 - container-exec {cargo build --release} 191 - ln -sf ("target/release/oscavmgr" | path expand) ~/.local/bin/ 192 - install vrcadvert 173 + install-not-brewed vrc-advert 174 + install-not-brewed oscavmgr 193 175 } 194 176 195 177 export def "uninstall oscavmgr" [] { 196 - rm -f ~/.local/bin/oscavmgr 197 - uninstall vrcadvert 198 - } 199 - 200 - def "install vrcadvert" [] { 201 - pull-or-clone vrcadvert https://github.com/galister/VrcAdvert main 202 - cd ($repos | path join vrcadvert) 203 - 204 - container-exec { 205 - [ 206 - dotnet-runtime-8.0 207 - dotnet-sdk-8.0 208 - ] | sudo dnf install -y ...$in 209 - dotnet publish -r linux-x64 --self-contained true "-p:PublishSingleFile=true" "-p:PublishTrimmed=true" 210 - } 211 - ln -sf ("bin/Release/net8.0/linux-x64/publish/VrcAdvert" | path expand) ~/.local/bin/ 212 - } 213 - 214 - def "uninstall vrcadvert" [] { 215 - rm -f ~.local/bin/VrcAdvert 178 + uninstall-brewed vrc-advert 179 + uninstall-brewed oscavmgr 216 180 } 217 181 218 182 export def "install stardust-xr" [] {
+1 -1
src/atomic-xr/common.nu
··· 3 3 4 4 use std log 5 5 6 - export const version = 4 6 + export const version = 5 7 7 8 8 export const data_path: path = "~/.local/share/atomic-xr" | path expand 9 9 export const config_path: path = "~/.config/atomic-xr.toml" | path expand
+25 -11
src/atomic-xr/self.nu
··· 40 40 mkdir ~/.local/bin 41 41 mkdir ($env.AXR_MODULE_PATH | path dirname) 42 42 43 + try {brew tap shiloh/atomicxr https://codeberg.org/shiloh/homebrew-atomicxr.git} 43 44 try {rm -r $env.AXR_MODULE_PATH o+e> /dev/null} 44 45 cp -r src/atomic-xr $env.AXR_MODULE_PATH 45 46 cp -f src/axr.nu ~/.local/bin/axr ··· 72 73 73 74 # Uninstall AtomicXR 74 75 export def "self uninstall" [] { 75 - log info "Removing installed applicaions" 76 + log info "Removing manually installed applicaions" 76 77 uninstall envision 77 - uninstall wlx-overlay-s 78 - uninstall wayvr-dashboard 79 - uninstall motoc 80 - uninstall oscavmgr 81 78 82 79 log info "Disabling system configurations" 83 80 sysconfig disable envision-plugins ··· 101 98 toolbox rm -f atomic-xr 102 99 log info "Uninstalling previously installed applications (don't worry, you can reinstall them later)" 103 100 rm -f ~/.local/bin/motoc ~/.local/bin/oscavmgr ~/.local/bin/wayvr-dashboard ~/.local/bin/wlx-overlay-s ~/.local/bin/envision ~/.local/share/applications/org.gabmus.envision.Devel.desktop ~/.local/share/applications/org.gabmus.envision.Devel.desktop ~/.local/share/bin/envision 104 - 105 - write-version 2 106 101 } 107 102 108 103 def "migrate 2" [] { 109 104 # steam-flatpak-envision and steam-flatpak-wivrn were merged into steam-flatpak-permissions 110 105 if not ($config_path | path exists) { 111 - write-version 3 112 106 log warning "Config file not found, migration not attempted" 113 107 return 114 108 } ··· 126 120 $config 127 121 | merge {sysconfigs: $sysconfigs} 128 122 | save -f $config_path 129 - 130 - write-version 3 131 123 } 132 124 133 125 def "migrate 3" [] { 134 126 # there was a bug in `icfg` that still set these values. after that was fixed, this migration had to be run again for some people that used it 135 127 migrate 2 136 - write-version 4 128 + } 129 + 130 + def "migrate 4" [] { 131 + # Switched to Homebrew for wlx-overlay-s, wayvr-dashboard, oscavmgr, vrcadvert, motoc, and openxr loader 132 + log info "Removing manually installed applications: wlx-overlay-s, wayvr-dashboard, oscavmgr, vrcadvert, and motoc" 133 + rm -f ~/.local/bin/wlx-overlay-s ~/.local/bin/wayvr-dashboard ~/.local/bin/motoc ~/.local/bin/oscavmgr ~/.local/bin/VrcAdvert 134 + [ 135 + "wlx-overlay-s" 136 + "wayvr-dashboard" 137 + "motoc" 138 + "oscavmgr" 139 + "vrcadvert" 140 + ] 141 + | par-each {|e| 142 + let repo = $data_path | path join repos $e 143 + rm -rf $repo 144 + } 145 + log info "Removing layered package: openxr-libs" 146 + try {rpm-ostree remove openxr-libs} 147 + 148 + log warning "Please run `axr apply` to apply the new configuration!" 137 149 } 138 150 139 151 # Migrate from installed version to current version ··· 163 175 1 => (migrate 1) 164 176 2 => (migrate 2) 165 177 3 => (migrate 3) 178 + 4 => (migrate 4) 166 179 _ => (error make { 167 180 msg: $"Attempted to migrate from an unknown version: ($e)." 168 181 help: "Please report this issue at: https://codeberg.org/shiloh/atomic-xr/issues" 169 182 }) 170 183 } 184 + write-version ($e + 1) 171 185 log info $"Finished migration: ($e) -> ($e + 1)" 172 186 } 173 187 }
+3 -2
src/atomic-xr/sysconfig.nu
··· 76 76 log warning "You'll need to open Envision at least once before plugins can be registered." 77 77 return 78 78 } 79 + let prefix = brew --prefix | path join bin 79 80 let plugins = $envision_config.plugins 80 81 | merge ( 81 - envision-plugin gen wlx-overlay-s "WlxOverlay-S" ~/.local/bin/wlx-overlay-s "--openxr" 82 + envision-plugin gen wlx-overlay-s "WlxOverlay-S" ($prefix | path join wlx-overlay-s) "--openxr" 82 83 --plugins $envision_config.plugins 83 84 --screenshots ["https://github.com/galister/wlx-overlay-s/raw/guide/wlx-s.png"] 84 85 --icon-url "https://github.com/galister/wlx-overlay-s/raw/main/wlx-overlay-s.svg" 85 86 --homepage-url "https://github.com/galister/wlx-overlay-s" 86 87 ) 87 88 | merge ( 88 - envision-plugin gen motoc "Motoc" ~/.local/bin/motoc continue 89 + envision-plugin gen motoc "Motoc" ($prefix | path join motoc) continue 89 90 --plugins $envision_config.plugins 90 91 --homepage-url "https://github.com/galister/motoc" 91 92 --description "Monado Tracking Origin Calibrator managed by AtomicXR"