boon

unix terminal framework
git clone https://git.ce9e.org/boon.git

commit
b5b01c21e86a395b93bd65d31e4e99125de37fc8
parent
ba5aa2bb59da676e3dfa63d7f33beade09ee55c3
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-07-12 16:29
add app.running

Diffstat

M boon.py 4 +++-

1 files changed, 3 insertions, 1 deletions


diff --git a/boon.py b/boon.py

@@ -100,6 +100,7 @@ def cursor_move(y, x):
  100   100 class App:
  101   101 	def __init__(self):
  102   102 		self.old_lines = []
   -1   103 		self.running = False
  103   104 		signal.signal(signal.SIGWINCH, self.on_resize)
  104   105 
  105   106 	def update(self):
@@ -123,9 +124,10 @@ class App:
  123   124 		self.update()
  124   125 
  125   126 	def run(self):
   -1   127 		self.running = True
  126   128 		with fullscreen():
  127   129 			self.on_resize()
  128    -1 			while True:
   -1   130 			while self.running:
  129   131 				key = getch()
  130   132 				if key:
  131   133 					self.on_key(key)