From 13142f1f853e2d992470759cc6743b912cc24a1f Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Mon, 27 May 2024 21:37:47 +0200 Subject: [PATCH] 2-screen fallback for xprofile --- ovr-utils/overlay_data.json | 2 +- xprofile | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ovr-utils/overlay_data.json b/ovr-utils/overlay_data.json index f22adfc..9e20616 100644 --- a/ovr-utils/overlay_data.json +++ b/ovr-utils/overlay_data.json @@ -1 +1 @@ -{"overlays":{"BatteryLevel 787":{"alpha":0.6,"fallback":["left","right","head"],"offsets":{"head":{"pos":[0,0,-0.35],"rot":[0,0,0,1]},"left":{"pos":[0,0,0],"rot":[0,0,0,1]},"right":{"pos":[0.086597,0.027936,0.165674],"rot":[-0.668819,-0.087167,-0.394435,0.624102]},"world":{"pos":[0,1,0],"rot":[0,0,0,1]}},"path":"res://overlays/BatteryLevel.tscn","target":"right","visible":true,"width":0.1},"Clock 53":{"alpha":0.6,"fallback":["left","right","head"],"offsets":{"head":{"pos":[-0.226232,-0.327426,-0.5479],"rot":[-0.192412,0.149258,0.035293,0.969254]},"left":{"pos":[-0.055556,0.06252,0.087553],"rot":[-0.319538,0.260592,0.405969,0.815584]},"right":{"pos":[0,0,0],"rot":[0,0,0,1]},"world":{"pos":[0,1,0],"rot":[0,0,0,1]}},"path":"res://overlays/Clock.tscn","target":"head","visible":true,"width":0.1},"KeyboardOverlay 95":{"alpha":0.8,"fallback":["left","right","head"],"offsets":{"head":{"pos":[0,0,-0.35],"rot":[0,0,0,1]},"left":{"pos":[0.194313,-0.024168,0.136503],"rot":[-0.64431,0.048261,0.03915,0.762235]},"right":{"pos":[0,0,0],"rot":[0,0,0,1]},"world":{"pos":[-0.529671,1.220752,1.079115],"rot":[-0.175528,0.744516,0.250599,0.593369]}},"path":"res://overlays/KeyboardOverlay.tscn","target":"left","visible":false,"width":0.4},"MainOverlay":{"alpha":0.5,"fallback":["left","right","head"],"offsets":{"head":{"pos":[0,0,-0.5],"rot":[0,0,0,1]},"left":{"pos":[0.15152,0.052258,0.000667],"rot":[-0.652702,-0.027279,0.008815,0.757072]},"right":{"pos":[0.060803,0.066139,0.047436],"rot":[-0.61547,-0.107841,0.222651,0.748327]},"world":{"pos":[0,1,0],"rot":[0,0,0,1]}},"path":"res://special_overlays/MainOverlay.tscn","target":"right","visible":true,"width":0.25}},"version":1} +{"overlays":{"BatteryLevel 787":{"alpha":0.6,"fallback":["left","right","head"],"offsets":{"head":{"pos":[0,0,-0.35],"rot":[0,0,0,1]},"left":{"pos":[0,0,0],"rot":[0,0,0,1]},"right":{"pos":[0.086597,0.027936,0.165674],"rot":[-0.668819,-0.087167,-0.394435,0.624102]},"world":{"pos":[0,1,0],"rot":[0,0,0,1]}},"path":"res://overlays/BatteryLevel.tscn","target":"right","visible":true,"width":0.1},"Clock 53":{"alpha":0.6,"fallback":["left","right","head"],"offsets":{"head":{"pos":[-0.226232,-0.327426,-0.5479],"rot":[-0.192412,0.149258,0.035293,0.969254]},"left":{"pos":[-0.055556,0.06252,0.087553],"rot":[-0.319538,0.260592,0.405969,0.815584]},"right":{"pos":[0,0,0],"rot":[0,0,0,1]},"world":{"pos":[0,1,0],"rot":[0,0,0,1]}},"path":"res://overlays/Clock.tscn","target":"head","visible":true,"width":0.1},"KeyboardOverlay 95":{"alpha":0.8,"fallback":["left","right","head"],"offsets":{"head":{"pos":[0,0,-0.35],"rot":[0,0,0,1]},"left":{"pos":[0.194313,-0.024168,0.136503],"rot":[-0.64431,0.048261,0.03915,0.762235]},"right":{"pos":[0,0,0],"rot":[0,0,0,1]},"world":{"pos":[-0.529671,1.220752,1.079115],"rot":[-0.175528,0.744516,0.250599,0.593369]}},"path":"res://overlays/KeyboardOverlay.tscn","target":"left","visible":true,"width":0.4},"MainOverlay":{"alpha":0.5,"fallback":["left","right","head"],"offsets":{"head":{"pos":[0,0,-0.5],"rot":[0,0,0,1]},"left":{"pos":[0.15152,0.052258,0.000667],"rot":[-0.652702,-0.027279,0.008815,0.757072]},"right":{"pos":[0.060803,0.066139,0.047436],"rot":[-0.61547,-0.107841,0.222651,0.748327]},"world":{"pos":[0,1,0],"rot":[0,0,0,1]}},"path":"res://special_overlays/MainOverlay.tscn","target":"right","visible":true,"width":0.25}},"version":1} diff --git a/xprofile b/xprofile index 32d748b..b234517 100644 --- a/xprofile +++ b/xprofile @@ -1,11 +1,26 @@ #setxkbmap -layout se +# DisplayPort-1 is for the VR headset + xrandr \ --output DisplayPort-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --set TearFree on \ --output DisplayPort-1 --off \ --output HDMI-A-1 --mode 1920x1080 --pos 0x0 --rotate normal --set TearFree on \ --output VGA-1-1 --mode 1280x1024 --pos 3840x0 --rotate normal +# if left screen is missing, try the 2-monitor setup +if [ $? ]; then + xrandr \ + --output DisplayPort-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --set TearFree on \ + --output DisplayPort-1 --off \ + --output HDMI-A-1 --off \ + --output VGA-1-1 --mode 1280x1024 --pos 3840x0 --rotate normal +fi + + +# VGA doesn't allow tearfree :( + +#### old configs # xrandr \ # --output DisplayPort-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --set TearFree on \ @@ -15,7 +30,6 @@ xrandr \ # --output DisplayPort-4 --mode 1920x1080 --pos 0x0 --rotate normal --set TearFree on \ -# VGA doesn't allow tearfree :( # xrandr