mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
add an option to time to hide seconds
This commit is contained in:
parent
b2b49983d8
commit
097a768ee3
2 changed files with 12 additions and 2 deletions
|
@ -24,12 +24,18 @@ __time_detail() {
|
|||
}
|
||||
|
||||
__time() {
|
||||
local secs=1
|
||||
[ -n "$TIME_SECONDS" ] && secs=$TIME_SECONDS
|
||||
case "$BYOBU_BACKEND" in
|
||||
screen)
|
||||
printf "\0050c:\005s"
|
||||
format="\0050c"
|
||||
[ "$secs" != "0" ] && format="$format:\005s"
|
||||
printf $format
|
||||
;;
|
||||
tmux|*)
|
||||
date +"%H:%M:%S"
|
||||
format="%H:%M"
|
||||
[ "$secs" != "0" ] && format="$format:%S"
|
||||
date +$format
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -72,3 +72,7 @@
|
|||
# to instead count number of distinct users logged onto the system
|
||||
# Default: 0
|
||||
#USERS_DISTINCT=0
|
||||
|
||||
# Set this to zero to hide seconds int the time display
|
||||
# Default 1
|
||||
#TIME_SECONDS=0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue