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.

Add untracked debug functions

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

+91
+90
src/atomic-xr/_debug.nu
··· 1 + # SPDX-License-Identifier: AGPL-3.0-only 2 + # Copyright (c) 2025 Shiloh Fen <shiloh@shilohfen.com> 3 + 4 + use std log 5 + 6 + export def main [ 7 + output?: path 8 + --base64 # Output base64 instead of creating a file 9 + ] { 10 + let output = $output | default (mktemp -t --suffix .msgpackz) | path expand 11 + log info "This function produces a brotli-compressed msgpack debug file. It can be useful to provide more context for hard-to-debug issues" 12 + log info $"If you'd like to check what information it contains, use `nu -c 'open ($output) | from msgpackz | explore'`" 13 + log info "" 14 + log info "Creating debug file..." 15 + 16 + let flatpak_installed = flatpak list --columns application | lines 17 + 18 + { 19 + debug_version: 1 20 + sys: { 21 + host: (sys host) 22 + cpu: (sys cpu) 23 + mem: (sys mem) 24 + temp: (sys temp) 25 + disks: (sys disks) 26 + } 27 + brew: { 28 + installed: (which brew | is-not-empty) 29 + doctor: (try {brew doctor o+e>| $in}) 30 + atomicxr_installed: (try { 31 + brew list --full-name 32 + | find -n matrixfurry.com/atomicxr/ 33 + | each {|| brew info --json $in | from json} 34 + | flatten 35 + }) 36 + } 37 + distrobox: { 38 + installed: (which distrobox | is-not-empty) 39 + } 40 + envision: { 41 + container_exists: (try { 42 + (distrobox ls --no-color 43 + | parse -r '(?P<id>.*)\s\|\s(?P<name>.*)\s\|\s(?P<status>.*)\s\|\s(?P<image>.*)' 44 + | str trim 45 + | skip 1 46 + | where name == envision 47 + | length) == 1 48 + }) 49 + bin_exists: ("~/.local/bin/envision" | path exists) 50 + devel_desktop_exists: ("~/.local/share/applications/org.gabmus.envision.Devel.desktop" | path exists) 51 + desktop_exists: ("~/.local/share/applications/org.gabmus.envision.desktop" | path exists) 52 + localshare_bin_exists: ("~/.local/share/bin/envision" | path exists) 53 + } 54 + paths_exist: { 55 + local: { 56 + _self: ("~/.local" | path exists) 57 + share: { 58 + _self: ("~/.local/share" | path exists) 59 + applications: ("~/.local/share/applications" | path exists) 60 + } 61 + bin: ("~/.local/bin" | path exists) 62 + } 63 + } 64 + steam: { 65 + paths: { 66 + dotsteam: (try {ls -lD ~/.steam}) 67 + localshare: (try {ls -lD ~/.local/share/Steam}) 68 + } 69 + } 70 + rpm-ostree: { 71 + requested: (rpm-ostree status --json | from json | get deployments | first | get requested-packages) 72 + } 73 + flatpak: { 74 + installed: { 75 + steam: ($flatpak_installed has "com.valvesoftware.Steam") 76 + unity: ($flatpak_installed has "com.unity.UnityHub") 77 + gaiasky: ($flatpak_installed has "space.gaiasky.GaiaSky") 78 + cartridges: ($flatpak_installed has "page.kramo.Cartridges") 79 + bsmanager: ($flatpak_installed has "io.bsmanager.bsmanager") 80 + } 81 + } 82 + } 83 + | to msgpackz 84 + | if $base64 { 85 + encode base64 86 + } else { 87 + save -f $output 88 + log info $"Successfully created debug file. It has been saved to ($output)" 89 + } 90 + }
+1
src/atomic-xr/mod.nu
··· 6 6 export use homebrew.nu 7 7 export use steamvr-lh.nu 8 8 export use runtime.nu 9 + export use _debug.nu