From 06ab23fb7174a1005280e1c9922c0d09c22f83e5 Mon Sep 17 00:00:00 2001 From: Lincoln Auster Date: Wed, 9 Sep 2020 20:27:36 -0600 Subject: [PATCH] fixed uptime script --- pridefetch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pridefetch b/pridefetch index 2de82df..fb7c700 100755 --- a/pridefetch +++ b/pridefetch @@ -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 = ''