Skip to content

Conversation

@bemug
Copy link

@bemug bemug commented Jan 17, 2021

I'm using stint for my script and needed to expand it a bit.
My main usage is waiting in bash till a pixel (or more) switch to a specific color, and then perform an action.
For this I introduced a way to specify where I want stint to grab the color from.

This looks like something like this:

while [ "$(stint-x $X -y $Y)" != "$COLOR" ]                      
do                                                                                  
    sleep 1                                                                     
done
echo "Color found"
#Perform specific action (example: perform a click with xdotool)

To ease the finding of X and Y position, I added also added a way to display which position stint grabs the pixel from, so that I can do it once with my mouse using stint -s, click on the matching pixel, grab the position and the color and pass it to my script.

None of these change the default behavior.

bemug added 3 commits January 17, 2021 13:23
Allow to get the color of a pixel from defined positions instead of
clicking with the mouse
User needs to specify both x and y
When specified, display the position of the grabbed pixel
@bemug
Copy link
Author

bemug commented Nov 12, 2021

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant