From 24380603a4618817543751a59dad3f75fe7a1da5 Mon Sep 17 00:00:00 2001 From: ivoulis Date: Mon, 9 Nov 2020 17:00:04 +0100 Subject: [PATCH] Do not start lisgd if it is not running (e.g. lockscreen) --- scripts/core/sxmo_rotate.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/core/sxmo_rotate.sh b/scripts/core/sxmo_rotate.sh index b1d01e7..01696cf 100755 --- a/scripts/core/sxmo_rotate.sh +++ b/scripts/core/sxmo_rotate.sh @@ -17,8 +17,7 @@ rotnormal() { pkill "$KEYBOARD" xrandr -o normal applyptrmatrix 0 0 0 0 0 0 0 0 0 - pkill lisgd - sxmo_lisgdstart.sh -o 0 & + pidof lisgd && pkill lisgd | sxmo_lisgdstart.sh -o 0 & exit 0 } @@ -26,8 +25,7 @@ rotright() { pkill "$KEYBOARD" xrandr -o right applyptrmatrix 0 1 0 -1 0 1 0 0 1 - pkill lisgd - sxmo_lisgdstart.sh -o 1 & + pidof lisgd && pkill lisgd | sxmo_lisgdstart.sh -o 1 & exit 0 } @@ -35,8 +33,7 @@ rotleft() { pkill "$KEYBOARD" xrandr -o left applyptrmatrix 0 -1 1 1 0 0 0 0 1 - pkill lisgd - sxmo_lisgdstart.sh -o -1 & + pidof lisgd && pkill lisgd | sxmo_lisgdstart.sh -o -1 & exit 0 }