* usr/bin/byobu-janitor, usr/lib/byobu/date,

usr/lib/byobu/include/constants, usr/lib/byobu/include/shutil,
  usr/lib/byobu/time, usr/share/byobu/profiles/tmux,
  usr/share/byobu/profiles/tmuxrc, usr/share/man/man1/byobu.1:
  - LP: #1059127
  - fix longstanding "date and time flash on and off" bug
  - this isn't a great fix, but it's a start
  - basically, we need to use the tmux status native support
    for timestamps
  - support configuration through ~/.byobu/datetime.tmux
  - this will be a difference between byobu-tmux and byobu-screen,
    which is a bummer
  - also, there's more work to be done, in order to enable/disable
    this via F9/byobu-config
This commit is contained in:
Dustin Kirkland 2014-02-10 14:37:18 -06:00
commit ed440d5a24
9 changed files with 24 additions and 17 deletions

15
debian/changelog vendored
View file

@ -1,6 +1,19 @@
byobu (5.71) unreleased; urgency=low
* UNRELEASED
* usr/bin/byobu-janitor, usr/lib/byobu/date,
usr/lib/byobu/include/constants, usr/lib/byobu/include/shutil,
usr/lib/byobu/time, usr/share/byobu/profiles/tmux,
usr/share/byobu/profiles/tmuxrc, usr/share/man/man1/byobu.1:
- LP: #1059127
- fix longstanding "date and time flash on and off" bug
- this isn't a great fix, but it's a start
- basically, we need to use the tmux status native support
for timestamps
- support configuration through ~/.byobu/datetime.tmux
- this will be a difference between byobu-tmux and byobu-screen,
which is a bummer
- also, there's more work to be done, in order to enable/disable
this via F9/byobu-config
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Jan 2014 17:48:35 -0600

View file

@ -68,6 +68,7 @@ MC=0
# Setup initial local user configuration
[ -r "$BYOBU_CONFIG_DIR/color" ] || printf "BACKGROUND=k\nFOREGROUND=w\nMONOCHROME=$MC" > "$BYOBU_CONFIG_DIR/color"
[ -r "$BYOBU_CONFIG_DIR/color.tmux" ] || printf "BYOBU_DARK=black\nBYOBU_LIGHT=white\nBYOBU_ACCENT=magenta\nBYOBU_HIGHLIGHT=red\nMONOCHROME=$MC" > "$BYOBU_CONFIG_DIR/color.tmux"
[ -r "$BYOBU_CONFIG_DIR/datetime.tmux" ] || printf 'BYOBU_DATE="%%Y-%%m-%%d "\nBYOBU_TIME="%%H:%%M:%%S"\n' > "$BYOBU_CONFIG_DIR/datetime.tmux"
[ -r "$BYOBU_CONFIG_DIR/profile" ] || echo "source \$BYOBU_PREFIX/share/$PKG/profiles/common" > "$BYOBU_CONFIG_DIR/profile"
[ -r "$BYOBU_CONFIG_DIR/profile.tmux" ] || echo "source \$BYOBU_PREFIX/share/$PKG/profiles/tmux" > "$BYOBU_CONFIG_DIR/profile.tmux"
[ -r "$BYOBU_CONFIG_DIR/keybindings" ] || echo "source \$BYOBU_PREFIX/share/$PKG/keybindings/common" > "$BYOBU_CONFIG_DIR/keybindings"

View file

@ -26,13 +26,8 @@ __date_detail() {
__date() {
case "$BYOBU_BACKEND" in
screen)
bd=$(date "+%m%d")
[ "$bd" = "0320" ] && msg="$(printf "%s" SGFwcHkgQmlydGhkYXkgU2NyZWVuIC0tIGh0dHA6Ly9iaXQubHkvc2NyZWVuLWJkYXkK | base64 -di)" && $BYOBU_BACKEND -X -S "byobu" at "*" echo "[$msg]"
color none; printf "\005Y-\005m-\005d"; color --
;;
tmux|*)
date +"%Y-%m-%d "
;;
esac
}

View file

@ -70,3 +70,5 @@ export BYOBU_LIGHT="white"
export BYOBU_ACCENT="#75507B" # AUBERGINE
export BYOBU_HIGHLIGHT="#DD4814" # UBUNTU ORANGE
export BYOBU_WINDOW_NAME="-"
export BYOBU_DATE="%Y-%m-%d "
export BYOBU_TIME="%H:%M:%S"

View file

@ -243,7 +243,7 @@ status_freq() {
cpu_freq) _RET=2 ;;
cpu_temp) _RET=19 ;;
custom) _RET=5 ;;
date) [ "$BYOBU_BACKEND" = "tmux" ] && _RET=1 || _RET=28793 ;;
date) _RET=9999999 ;;
disk) _RET=13 ;;
disk_io) _RET=3 ;;
distro) _RET=9999999 ;;
@ -267,7 +267,7 @@ status_freq() {
services) _RET=53 ;;
session) _RET=9999999 ;;
swap) _RET=19 ;;
time) [ "$BYOBU_BACKEND" = "tmux" ] && _RET=1 || _RET=9999999 ;;
time) _RET=9999999 ;;
time_binary) _RET=23 ;;
time_utc) _RET=11 ;;
trash) _RET=9999999 ;;

View file

@ -32,11 +32,6 @@ __time() {
[ "$secs" != "0" ] && format="$format:\005s"
printf $format
;;
tmux|*)
format="%H:%M"
[ "$secs" != "0" ] && format="$format:%S"
date +$format
;;
esac
}

View file

@ -85,7 +85,7 @@ set -g status-interval 1
set -g status-left-length 256
set -g status-right-length 256
set -g status-left '#(byobu-status tmux_left)'
set -g status-right '#(byobu-status tmux_right)'
set -g status-right '#(byobu-status tmux_right)'$BYOBU_DATE$BYOBU_TIME
set -g message-bg $BYOBU_ACCENT
set -g message-fg white

View file

@ -23,6 +23,7 @@
###############################################################################
source-file $HOME/.byobu/color.tmux
source-file $HOME/.byobu/datetime.tmux
source-file $BYOBU_CONFIG_DIR/profile.tmux
source-file $BYOBU_CONFIG_DIR/keybindings.tmux
source-file $BYOBU_CONFIG_DIR/.tmux.conf

View file

@ -43,7 +43,7 @@ The background colors of the \fBbyobu\fP status lines can be adjusted by editing
printf "\\005{= bw}%s\\005{\-}" "$(uname \-r)"
\fBdate\fP \- the system date in YYYY-MM-DD formate; displayed in the lower on the far right in the default text color on the default background
\fBdate\fP \- the system date in YYYY-MM-DD format, or you can set this to any valid \fBstrftime\fP(3) you like in \fI$BYOBU_CONFIG_DIR/datetime\fP; displayed in the lower on the far right in the default text color on the default background
\fBdisk\fP \- total disk space available and total used on / directory; displayed in the lower bar on the far right in white text on a light purple background; override the default directory by specifying an alternate mount point with MONITORED_DISK=/wherever in \fI$BYOBU_CONFIG_DIR/statusrc\fP
@ -95,11 +95,11 @@ The background colors of the \fBbyobu\fP status lines can be adjusted by editing
\fBswap\fP \- total swap space and total used as a percentage of the total available; displayed in the lower bar toward the right in white text on a light green background with a trailing '%' sign
\fBtime\fP \- the system time in HH:MM:SS format; displayed in the lower bar on the far right in the default text and default background colors
\fBtime\fP \- the system time in HH:MM:SS format (by default), or you can set this to any valid \fBstrftime\fP(3) you like in \fI$BYOBU_CONFIG_DIR/datetime\fP; displayed in the lower bar on the far right in the default text and default background colors
\fBtime_binary\fP \- only for the hard core geek, the local system time in binary; requires UTF-8 support in a VERY recent version of GNU Screen; displayed in the lower bar on the far right in the default text and background colors
\fBtime_utc\fP \- the UTC system time in HH:MMformat; displayed in the lower bar on the far right in dark text on a light background
\fBtime_utc\fP \- the UTC system time in HH:MM format; displayed in the lower bar on the far right in dark text on a light background
\fBupdates_available\fP \- the number of updates available on the system; displayed in the lower bar toward the right in white text on a red background with a trailing '!' sign; if any updates are marked 'security updates', then there will be a total of two trailing exclamation points, '!!'