From cc8835df90c2b5411bfb2295872f8e955fe91229 Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Fri, 19 Apr 2024 11:59:09 +0300 Subject: [PATCH] Launch arRPC before vesktop and run vesktop in wayland mode --- apsalar/vesktop | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/apsalar/vesktop b/apsalar/vesktop index 27ebe38..8cc7fd7 100755 --- a/apsalar/vesktop +++ b/apsalar/vesktop @@ -1,4 +1,23 @@ #!/bin/sh +arRPCdir="$HOME/.local/share/vesktop/arrpc" +# check if arRPC is installed and autoinstall if necessary +install_arRPC () { + git clone https://github.com/OpenAsar/arRPC "$arRPCdir" + cd "$arRPCdir" && npm install +} + +if [ ! -d "$arRPCdir" ]; then + install_arRPC +fi + +# start arRPC +cd "$arRPCdir" && node src & +arRPCPID=$(pgrep -f 'node src') + +# start Vesktop $HOME/.local/share/vesktop/vesktop --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto +# exit arRPC when Vesktop closes +pkill -9 $arRPCPID +