aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xunstickpixels4
1 files changed, 4 insertions, 0 deletions
diff --git a/unstickpixels b/unstickpixels
index 0c4ad91..2068ea8 100755
--- a/unstickpixels
+++ b/unstickpixels
@@ -24,6 +24,7 @@ from subprocess import Popen, PIPE
def print(text, end = '\n'):
sys.stdout.buffer.write((text + end).encode('utf-8'))
+ sys.stdout.buffer.flush()
(height, width) = Popen(['stty', 'size'], stdout=PIPE).communicate()[0].decode('utf-8', 'replace').split(' ')
@@ -56,8 +57,11 @@ try:
print('\033[H', '')
while True:
sys.stdout.buffer.write('\033]P0FF0000\033[2J'.encode('utf-8'))
+ sys.stdout.buffer.flush()
sys.stdout.buffer.write('\033]P000FF00\033[2J'.encode('utf-8'))
+ sys.stdout.buffer.flush()
sys.stdout.buffer.write('\033]P00000FF\033[2J'.encode('utf-8'))
+ sys.stdout.buffer.flush()
except:
pass
if started: