feat: add enable-picom-ingame.sh

This commit is contained in:
tretrauit 2022-06-27 03:29:03 +07:00
parent 57604a19c8
commit 526400efa9
No known key found for this signature in database
GPG Key ID: CDDE1C97EE305DAF

View File

@ -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 <process name>.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."