diff --git a/proarbeit.py b/proarbeit.py index 5768829..1b0abc5 100644 --- a/proarbeit.py +++ b/proarbeit.py @@ -1 +1,24 @@ -from pynput.mouse import Listener +from pynput.mouse import Controller +from secrets import randbits +from time import sleep + + +def initialize_mouse(): + mouse = Controller() + return mouse + + +def erratic_movement(mouse): + x, y = mouse.position + mouse.move(x + randbits(2), y + randbits(2)) + sleep(randbits(2)) + + +def main(): + mouse = initialize_mouse() + while True: + erratic_movement(mouse) + + +if __name__ == "__main__": + main() diff --git a/shell.nix b/shell.nix index bf53233..56ce4b1 100644 --- a/shell.nix +++ b/shell.nix @@ -2,4 +2,4 @@ with pkgs; -mkShell { buildInputs = [ python38Packages.pynput ]; } +mkShell { buildInputs = [ python38 python38Packages.pynput ]; }