From 526400efa9e8ee39dde1ae728c22383bb9e0b869 Mon Sep 17 00:00:00 2001 From: tretrauit Date: Mon, 27 Jun 2022 03:29:03 +0700 Subject: [PATCH] feat: add enable-picom-ingame.sh --- apps/Lutris/enable-picom-ingame.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 apps/Lutris/enable-picom-ingame.sh diff --git a/apps/Lutris/enable-picom-ingame.sh b/apps/Lutris/enable-picom-ingame.sh new file mode 100755 index 0000000..878fd02 --- /dev/null +++ b/apps/Lutris/enable-picom-ingame.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# Put your game process name here (can be full name or short name) +# If it doesn't work for .exe file, try .e instead +# it may work. +PROCESS="" + +echo "Waiting for '$PROCESS' to start..." +until _=$(pidof $PROCESS) +do + sleep 1 +done + +echo "Starting picom..." +picom --experimental-backends & +picom_pid=$! +echo "picom PID: $picom_pid" + +echo "Waiting for '$PROCESS' to exit..." +while [[ $(pidof $PROCESS) ]]; do + sleep .5 +done +echo "Killing picom..." +kill -15 $picom_pid +echo "Done."