From ed92f14d78d7c49f15831815e17117582a021444 Mon Sep 17 00:00:00 2001 From: TheMohawkNinja Date: Thu, 26 Nov 2020 13:06:18 -0500 Subject: [PATCH] Added multimonitor support --- getTermInfo | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/getTermInfo b/getTermInfo index c9e6d16..923a276 100755 --- a/getTermInfo +++ b/getTermInfo @@ -23,6 +23,24 @@ then fi fi -printf "\033]10;#$(cat ~/.config/WallFade/TermColors | tail -1)\007" +for (( i=1; i <= $(cat ~/.config/WallFade/TermColors | wc -l); i=$(( $i + 5 )) )) +do + + MonXPos=$(cat ~/.config/WallFade/TermColors | head -$(( $i + 2 )) | tail -1) + MonXSize=$(cat ~/.config/WallFade/TermColors | head -$i | tail -1) + MonYPos=$(cat ~/.config/WallFade/TermColors | head -$(( $i + 3 )) | tail -1) + MonYSize=$(cat ~/.config/WallFade/TermColors | head -$(( $i + 1)) | tail -1) + + if [ $X -ge $MonXPos ] && [ $X -lt $(( $MonXPos + $MonXSize )) ] + then + if [ $Y -ge $MonYPos ] && [ $Y -lt $(( $MonYPos + $MonYSize )) ] + then + #echo "$X >= $MonXPos < $(( $MonXPos + $MonXSize ))" + #echo "$Y >= $MonYPos < $(( $MonYPos + $MonYSize ))" + #echo "Setting color to #$(cat ~/.config/WallFade/TermColors | head -$(( $i + 4 )) | tail -1)" + printf "\033]10;#$(cat ~/.config/WallFade/TermColors | head -$(( $i + 4 )) | tail -1)\007" + fi + fi +done $SHELL