#!/bin/sh # pray that the mouse is in the edit field once this timer runs out sleep 3 pattern=' 1010 11001100 1111000011110000 11111111000000001111111100000000 ' pattern="$(echo "$pattern" | tr -d '\n' | sed 's/./\0 /g')" for pixel in $pattern ; do # shift mouse 1 pixel right xdotool mousemove_relative 1 0 # skip 0's in $pattern [ $pixel -ne 1 ] && continue # drag mouse 1px down to create pixel xdotool mousedown 1 sleep 0.05 xdotool mousemove_relative 0 5 sleep 0.05 xdotool mouseup 1 sleep 0.05 xdotool mousemove_relative 0 -5 sleep 0.05 done