Add exclamation mark for uptime > 100 days
htop has this for years, and I think it would be fun if neofetch also matches it. htop reference: https://github.com/htop-dev/htop/blob/1601931bbf7837a2a910b854d58716da344aeb22/UptimeMeter.c#L36
This commit is contained in:
@@ -1481,6 +1481,9 @@ get_uptime() {
|
|||||||
((${h/ *} == 0)) && unset h
|
((${h/ *} == 0)) && unset h
|
||||||
((${m/ *} == 0)) && unset m
|
((${m/ *} == 0)) && unset m
|
||||||
|
|
||||||
|
# Add "(!)" if more than 100 days
|
||||||
|
((${d/ *} > 100)) && d="${d}(!)"
|
||||||
|
|
||||||
uptime=${d:+$d, }${h:+$h, }$m
|
uptime=${d:+$d, }${h:+$h, }$m
|
||||||
uptime=${uptime%', '}
|
uptime=${uptime%', '}
|
||||||
uptime=${uptime:-$s seconds}
|
uptime=${uptime:-$s seconds}
|
||||||
|
|||||||
Reference in New Issue
Block a user