.dist
This commit is contained in:
parent
99b1e003cb
commit
4966f90775
@ -100,12 +100,7 @@ class JSONIO:
|
||||
|
||||
class I3statusHandler:
|
||||
modules = []
|
||||
|
||||
def __init__(self, fd=None):
|
||||
if fd is None:
|
||||
fd = sys.stdin
|
||||
|
||||
self.io = JSONIO(IOHandler(fd))
|
||||
file = sys.stdin
|
||||
|
||||
def register(self, module, position=0):
|
||||
"""Register a new module."""
|
||||
@ -115,6 +110,6 @@ class I3statusHandler:
|
||||
module.registered(self)
|
||||
|
||||
def run(self):
|
||||
for j in self.io.read():
|
||||
for j in JSONIO(IOHandler(self.file)).read():
|
||||
for module in self.modules:
|
||||
j.insert(module.position, module.output)
|
||||
|
@ -12,6 +12,12 @@ from i3pystatus import (
|
||||
|
||||
status = I3statusHandler()
|
||||
|
||||
# If you want to start i3status automatically with i3pystatus,
|
||||
# uncomment the following lines
|
||||
#import subprocess
|
||||
#process = subprocess.Popen(["i3status", "-c", "~/.i3/status"], stdout=subprocess.PIPE, universal_newlines=True)
|
||||
#status.file = process.stdout
|
||||
|
||||
# Regular expression file watcher
|
||||
# If you're using a thinkpad, chances are that this displays your fan speed and level
|
||||
regexsettings = {
|
||||
|
Loading…
Reference in New Issue
Block a user