diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/status_script.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/status_script.py b/scripts/status_script.py index 1c229e0..8881735 100755 --- a/scripts/status_script.py +++ b/scripts/status_script.py @@ -31,21 +31,30 @@ class SublabStatus(object): if __name__ == '__main__': s = SublabStatus() if s.door_status() == 'open': - colors = ('#0f0', '#222') + colors = ('#0f0', '#222', 'status-open.png') elif s.door_status() == 'closed': - colors = ('#222', '#f00') + colors = ('#222', '#f00', 'status-closed.png') else: - colors = ('#222', '#222') + colors = ('#222', '#222', 'status-unknown.png') css = ''' span.sublabopen { color: %s; } - span.sublabclosed { color: %s; } + +#statusimage { + background: url(../img/%s) ; + height: 100px; + width: 100px; + position: absolute; + right: 20px; +} + + ''' % colors path = os.path.realpath(os.path.dirname(__file__)) |