diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-13 03:04:48 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-13 03:04:48 +0200 |
commit | 56aeee6b3f7c8182f56a2369b83345373306fede (patch) | |
tree | 28a8a4fbbb34e503a65860ee13d275d628de7938 | |
parent | dist + update deps (diff) | |
download | nightshift-56aeee6b3f7c8182f56a2369b83345373306fede.tar.gz nightshift-56aeee6b3f7c8182f56a2369b83345373306fede.tar.bz2 nightshift-56aeee6b3f7c8182f56a2369b83345373306fede.tar.xz |
print location
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r-- | src/interface.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interface.py b/src/interface.py index 295d3b6..4dad289 100644 --- a/src/interface.py +++ b/src/interface.py @@ -59,6 +59,9 @@ def ui_print(): brightness = [b * 100 for b in [red_brightness] + list(red_brightnesses)] print('\033[H\033[2J', end = '') if red_running: + lat, lon = red_location + _if = lambda pn, v : pn[0] if v >= 0 else pn[1] + print('Location: %.4f°%s %.4f°%s' % (abs(lat), _if('NS', lat), abs(lon), _if('EW', lon))) print('Temperature: %.0f K (day: %.0f K, night: %.0f K)' % tuple(temperature)) print('Brightness: %.0f %% (day: %.0f %%, night: %.0f %%)' % tuple(brightness)) print('Dayness: %.0f %%' % (red_period * 100)) |