Merge pull request #6 from LincolnAuster/master

fixed uptime script. sorry this took so long to merge i forgot about this project LOL
This commit is contained in:
charlotte 2020-11-25 16:35:32 +00:00 committed by GitHub
commit e0ba93ffc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,11 +67,10 @@ def draw_info(flag_name):
kernel = uname_info.split(' ')[1]
row_info = f'{row_color}kern {reset}{kernel}'
elif curr_row == 4:
uptime = run(['cat', '/proc/uptime'], capture_output=True)
(total_secs, total_idle_secs) = uptime.stdout.decode().strip().split(' ')
uptime = run(['uptime'], capture_output=True)
time = uptime.stdout.decode().split(" ")[1]
total_time = strftime('%dd, %Hh, %Mm', gmtime(float(total_secs)))
row_info = f'{row_color}uptime {reset}{total_time}'
row_info = f'{row_color}uptime {reset}{time}'
else:
row_info = ''