From 668f02386891915e6b1979d80871b27d1ff4dc0c Mon Sep 17 00:00:00 2001 From: erpalma Date: Tue, 11 Dec 2018 11:08:30 +0100 Subject: [PATCH] print the actual power source (AC/BATTERY) in --monitor mode --- lenovo_fix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo_fix.py b/lenovo_fix.py index 2de779d..bd4476a 100755 --- a/lenovo_fix.py +++ b/lenovo_fix.py @@ -537,7 +537,7 @@ def monitor(exit_event, wait): ) stats2[power_plane] = '{:.1f} W'.format(energy_w) output2 = ('{:s}: {:s}'.format(label, stats2[label]) for label in stats2) - print(' - '.join(output) + ' || ' + ' - '.join(output2) + ' ' * 10, end='\r') + print('[{}] {} || {}{}'.format(power['source'], ' - '.join(output), ' - '.join(output2), ' ' * 10), end='\r') exit_event.wait(wait)