add script that relaunches SteamVR and VRChat when VRChat crashes
This commit is contained in:
parent
de58d68cc0
commit
278bedcd1e
4 changed files with 41 additions and 2 deletions
33
scripts/vrc-monitor.py
Executable file
33
scripts/vrc-monitor.py
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/env python3
|
||||||
|
import time
|
||||||
|
import os
|
||||||
|
|
||||||
|
def notify_fail():
|
||||||
|
os.system('notify-send "Restarting SteamVR" "VRChat died again :(" --icon /home/crispypin/pictures/emotes/screech.gif')
|
||||||
|
|
||||||
|
def notify_ok():
|
||||||
|
os.system('notify-send "Go play VRChat" "It stayed open for 150s" --icon /home/crispypin/pictures/emotes/frogchamp.png')
|
||||||
|
|
||||||
|
STATUSFILE = "/tmp/VRC_RUNNING"
|
||||||
|
|
||||||
|
is_ok = True
|
||||||
|
for i in range(150):
|
||||||
|
time.sleep(1)
|
||||||
|
if not os.path.isfile(STATUSFILE):
|
||||||
|
is_ok = False
|
||||||
|
break
|
||||||
|
|
||||||
|
if is_ok:
|
||||||
|
notify_ok()
|
||||||
|
exit()
|
||||||
|
else:
|
||||||
|
notify_fail()
|
||||||
|
|
||||||
|
## restart steam
|
||||||
|
os.system("killall vrmonitor")
|
||||||
|
time.sleep(2)
|
||||||
|
# start steamvr
|
||||||
|
os.system("steam steam://rungameid/250820")
|
||||||
|
time.sleep(7)
|
||||||
|
# start vrchat
|
||||||
|
os.system("steam steam://rungameid/438100")
|
1
steam/steamvr-launch-options.txt
Normal file
1
steam/steamvr-launch-options.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
RADV_DEBUG=zerovram %command%
|
|
@ -1 +1,5 @@
|
||||||
$(sleep 150 && notify-send "Gaming time?" "VRC has stayed open for 150s" --icon /home/crispypin/pictures/emotes/screech.gif) & PROTON_LOG=1 PROTON_LOG_DIR=/tmp %command% --melonloader.hideconsole
|
# uses script from this repo
|
||||||
|
$(python3 /home/crispypin/dotfiles/scripts/vrc-monitor.py) & touch /tmp/VRC_RUNNING && PROTON_LOG=1 PROTON_LOG_DIR=/tmp %command% --melonloader.hideconsole && rm /tmp/VRC_RUNNING
|
||||||
|
|
||||||
|
# simple, standalone:
|
||||||
|
$(sleep 150 && notify-send "Gaming time?" "VRChat was launched 150s ago" --icon /home/crispypin/pictures/emotes/screech.gif) & PROTON_LOG=1 PROTON_LOG_DIR=/tmp %command% --melonloader.hideconsole
|
||||||
|
|
|
@ -41,5 +41,6 @@
|
||||||
"markdown.preview.fontFamily": "sans",
|
"markdown.preview.fontFamily": "sans",
|
||||||
"editor.bracketPairColorization.enabled": false,
|
"editor.bracketPairColorization.enabled": false,
|
||||||
"rust-analyzer.inlayHints.parameterHints.enable": false,
|
"rust-analyzer.inlayHints.parameterHints.enable": false,
|
||||||
"window.zoomLevel": 1
|
"window.zoomLevel": 1,
|
||||||
|
"editor.unicodeHighlight.nonBasicASCII": false
|
||||||
}
|
}
|
Loading…
Reference in a new issue