Hoi
This commit is contained in:
parent
d3849148cb
commit
78bbd1b44d
5 changed files with 17 additions and 207 deletions
|
@ -36,7 +36,7 @@ class BarGroupType(enum.Enum):
|
|||
|
||||
|
||||
class BarStdoutThread(threading.Thread):
|
||||
def run(self):
|
||||
def run(self) -> None:
|
||||
while Bar.running:
|
||||
handle = Bar.process.stdout.readline().strip()
|
||||
if not len(handle):
|
||||
|
@ -58,7 +58,7 @@ class Bar:
|
|||
FONTSIZE = 10
|
||||
|
||||
@staticmethod
|
||||
def init():
|
||||
def init() -> None:
|
||||
Bar.running = True
|
||||
Section.init()
|
||||
|
||||
|
@ -75,7 +75,7 @@ class Bar:
|
|||
# Bar(1)
|
||||
|
||||
@staticmethod
|
||||
def stop():
|
||||
def stop() -> None:
|
||||
Bar.running = False
|
||||
Bar.process.kill()
|
||||
|
||||
|
@ -83,11 +83,11 @@ class Bar:
|
|||
os.killpg(os.getpid(), signal.SIGTERM)
|
||||
|
||||
@staticmethod
|
||||
def run():
|
||||
def run() -> None:
|
||||
Bar.forever()
|
||||
i3 = i3ipc.Connection()
|
||||
|
||||
def doStop(*args):
|
||||
def doStop(*args) -> None:
|
||||
Bar.stop()
|
||||
print(88)
|
||||
|
||||
|
@ -176,6 +176,7 @@ class Bar:
|
|||
# Color for empty sections
|
||||
Bar.string += BarGroup.color(*Section.EMPTY)
|
||||
|
||||
# print(Bar.string)
|
||||
Bar.process.stdin.write(bytes(Bar.string + '\n', 'utf-8'))
|
||||
Bar.process.stdin.flush()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue