mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 05:53:22 -07:00
Newlines are important
This commit is contained in:
parent
c0b86f63a9
commit
0dbb93b961
6 changed files with 7 additions and 7 deletions
|
@ -31,4 +31,4 @@ __cpu_count() {
|
||||||
c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo)
|
c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo)
|
||||||
fi
|
fi
|
||||||
[ "$c" = "1" ] || printf "%sx" "$c"
|
[ "$c" = "1" ] || printf "%sx" "$c"
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,4 +48,4 @@ __cpu_freq() {
|
||||||
fi
|
fi
|
||||||
[ -n "$freq" ] || return
|
[ -n "$freq" ] || return
|
||||||
color b c W; printf "%s" "$freq"; color -; color c W; printf "%s" "$ICON_GHz"; color --
|
color b c W; printf "%s" "$freq"; color -; color c W; printf "%s" "$ICON_GHz"; color --
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,4 +55,4 @@ __disk() {
|
||||||
[ -n "$size" ] || return
|
[ -n "$size" ] || return
|
||||||
color b m W; printf "%s" "$size"; color -; color m W; printf "%s" "$unit"; color -;
|
color b m W; printf "%s" "$size"; color -; color m W; printf "%s" "$unit"; color -;
|
||||||
color b m W; printf "%s" "$pct"; color -; color m W; printf "%s" "$PCT"; color --;
|
color b m W; printf "%s" "$pct"; color -; color m W; printf "%s" "$PCT"; color --;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,4 +33,4 @@ __load_average() {
|
||||||
fi
|
fi
|
||||||
[ -n "$one" ] || return
|
[ -n "$one" ] || return
|
||||||
color Y k; printf "$one"; color --
|
color Y k; printf "$one"; color --
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ __uptime() {
|
||||||
read u idle < /proc/uptime
|
read u idle < /proc/uptime
|
||||||
u=${u%.*}
|
u=${u%.*}
|
||||||
elif [ $(uname) = "FreeBSD" ]; then
|
elif [ $(uname) = "FreeBSD" ]; then
|
||||||
u=$( sysctl -n kern.boottime | sed -En 's:.*sec = ([[:digit:]]+),.*:\1:p' )
|
u=$(sysctl -n kern.boottime | sed -En 's:.*sec = ([[:digit:]]+),.*:\1:p')
|
||||||
u=$(($(date +%s) - $u))
|
u=$(($(date +%s) - $u))
|
||||||
elif [ -x /usr/sbin/sysctl ]; then
|
elif [ -x /usr/sbin/sysctl ]; then
|
||||||
# MacOS support
|
# MacOS support
|
||||||
|
@ -54,4 +54,4 @@ __uptime() {
|
||||||
fi
|
fi
|
||||||
[ -n "$str" ] || return
|
[ -n "$str" ] || return
|
||||||
color w b; printf "%s" "${str}"; color --
|
color w b; printf "%s" "${str}"; color --
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,4 @@ __users() {
|
||||||
else
|
else
|
||||||
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"*
|
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"*
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue