mirror of
https://github.com/eepykate/fet.sh.git
synced 2026-11-20 19:41:40 +00:00
force 2-wide minutes/hours
This commit is contained in:
1 parent
9cf9ab695a
commit
313aa374b0
1 file changed
+3
-4
@@ -74,9 +74,8 @@ cpu="${cpu% *-Core*}"
|
|||||||
## Uptime
|
## Uptime
|
||||||
# the simple math is shamefully stolen from aosync
|
# the simple math is shamefully stolen from aosync
|
||||||
IFS=. read -r uptime _ < /proc/uptime
|
IFS=. read -r uptime _ < /proc/uptime
|
||||||
d="$((uptime / 60 / 60 / 24))"
|
d=$((uptime / 60 / 60 / 24))
|
||||||
h="$((uptime / 60 / 60 % 24))"
|
up=$(printf %02d:%02d $((uptime / 60 / 60 % 24)) $((uptime / 60 % 60)))
|
||||||
m="$((uptime / 60 % 60))"
|
|
||||||
|
|
||||||
## Kernel
|
## Kernel
|
||||||
read -r _ _ version _ < /proc/version
|
read -r _ _ version _ < /proc/version
|
||||||
@@ -109,7 +108,7 @@ print() {
|
|||||||
[ "$ID" ] && print os "$ID"
|
[ "$ID" ] && print os "$ID"
|
||||||
[ "$SHELL" ] && print sh "${SHELL##*/}"
|
[ "$SHELL" ] && print sh "${SHELL##*/}"
|
||||||
[ "$wm" ] && print wm "$wm"
|
[ "$wm" ] && print wm "$wm"
|
||||||
[ "$m" ] && print up "${d}d ${h}:${m}"
|
[ "$d" ] && print up "${d}d $up"
|
||||||
[ "$gtk" ] && print gtk "${gtk# }"
|
[ "$gtk" ] && print gtk "${gtk# }"
|
||||||
[ "$cpu" ] && print cpu "$vendor $cpu"
|
[ "$cpu" ] && print cpu "$vendor $cpu"
|
||||||
[ "$mem" ] && print mem "${mem}MB"
|
[ "$mem" ] && print mem "${mem}MB"
|
||||||
|
|||||||
Reference in new issue
Block a user