* usr/lib/byobu/time, usr/share/byobu/status/statusrc:

- add an option to time to hide seconds
This commit is contained in:
Dustin Kirkland 2013-03-12 23:13:14 -05:00
commit cbd4c56dcb
3 changed files with 14 additions and 2 deletions

2
debian/changelog vendored
View file

@ -13,6 +13,8 @@ byobu (5.34) unreleased; urgency=low
- fix time_binary printing "\n" and killing other output - fix time_binary printing "\n" and killing other output
* usr/lib/byobu/updates_available: * usr/lib/byobu/updates_available:
- make updates_available aware of homebrew - 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 <kirkland@ubuntu.com> Fri, 08 Feb 2013 14:48:02 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Fri, 08 Feb 2013 14:48:02 -0600

View file

@ -24,12 +24,18 @@ __time_detail() {
} }
__time() { __time() {
local secs=1
[ -n "$TIME_SECONDS" ] && secs=$TIME_SECONDS
case "$BYOBU_BACKEND" in case "$BYOBU_BACKEND" in
screen) screen)
printf "\0050c:\005s" format="\0050c"
[ "$secs" != "0" ] && format="$format:\005s"
printf $format
;; ;;
tmux|*) tmux|*)
date +"%H:%M:%S" format="%H:%M"
[ "$secs" != "0" ] && format="$format:%S"
date +$format
;; ;;
esac esac
} }

View file

@ -72,3 +72,7 @@
# to instead count number of distinct users logged onto the system # to instead count number of distinct users logged onto the system
# Default: 0 # Default: 0
#USERS_DISTINCT=0 #USERS_DISTINCT=0
# Set this to zero to hide seconds int the time display
# Default 1
#TIME_SECONDS=0