Explorar o código

print the actual power source (AC/BATTERY) in --monitor mode

erpalma %!s(int64=6) %!d(string=hai) anos
pai
achega
668f023868
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lenovo_fix.py

+ 1 - 1
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)