diff --git a/debian/changelog b/debian/changelog index 1d7335d6..95050129 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ byobu (5.34) unreleased; urgency=low - fix time_binary printing "\n" and killing other output * usr/lib/byobu/updates_available: - make updates_available aware of homebrew + * usr/lib/byobu/time, usr/share/byobu/status/statusrc: + - add an option to time to hide seconds -- Dustin Kirkland Fri, 08 Feb 2013 14:48:02 -0600 diff --git a/usr/lib/byobu/time b/usr/lib/byobu/time index e35c98de..d527c5f5 100755 --- a/usr/lib/byobu/time +++ b/usr/lib/byobu/time @@ -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 } diff --git a/usr/share/byobu/status/statusrc b/usr/share/byobu/status/statusrc index d9d20dcc..048598a8 100644 --- a/usr/share/byobu/status/statusrc +++ b/usr/share/byobu/status/statusrc @@ -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