mirror of
https://github.com/SpyHoodle/PrideFetch.git
synced 2024-11-09 21:25:42 +00:00
fixed uptime script
This commit is contained in:
parent
32d24fd2be
commit
06ab23fb71
@ -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 = ''
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user