mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 05:19:40 +02:00
28 lines
596 B
Python
Executable file
28 lines
596 B
Python
Executable file
#!/usr/bin/python3
|
|
import os
|
|
import sys
|
|
|
|
|
|
def waitMouseClick():
|
|
mouse = open("/dev/input/mice", "rb")
|
|
down = False
|
|
while True:
|
|
buf = mouse.read(3)
|
|
if ((buf[0] & 0x1) == 1):
|
|
down = True
|
|
if (((buf[0] & 0x1) == 0) and down):
|
|
break
|
|
mouse.close()
|
|
|
|
|
|
# Hide blinking cursor
|
|
sys.stdout.write("\033[?1;0;0c")
|
|
sys.stdout.flush()
|
|
|
|
while True:
|
|
os.system("killall fim")
|
|
os.system("fim -qa image1.png 2>/dev/null &")
|
|
waitMouseClick()
|
|
os.system("killall fim")
|
|
os.system("fim -qa image2.png 2>/dev/null &")
|
|
waitMouseClick()
|