From 2cda9167979804c94d701f25e8725acda804b6d2 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 19 Jul 2011 18:03:45 -0500 Subject: [PATCH] * usr/bin/byobu-statusd: - check that file is readable before sourcing * usr/lib/byobu/mem_available: - no need to source status here any more * usr/share/byobu/keybindings/f-keys, usr/share/byobu/profiles/common: - move the kill of statusd to the profile, near the launching of statusd --- debian/changelog | 7 +++++++ usr/bin/byobu-statusd | 2 +- usr/lib/byobu/mem_available | 1 - usr/share/byobu/keybindings/f-keys | 2 +- usr/share/byobu/profiles/common | 2 ++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index ab019247..251eb091 100644 --- a/debian/changelog +++ b/debian/changelog @@ -117,6 +117,13 @@ byobu (4.18) unreleased; urgency=low usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common, usr/share/byobu/profiles/screenrc: - killall byobu-statusd owned by user before refreshing + * usr/bin/byobu-statusd: + - check that file is readable before sourcing + * usr/lib/byobu/mem_available: + - no need to source status here any more + * usr/share/byobu/keybindings/f-keys, usr/share/byobu/profiles/common: + - move the kill of statusd to the profile, near the launching of + statusd [ James Spencer ] * usr/lib/byobu/.constants: diff --git a/usr/bin/byobu-statusd b/usr/bin/byobu-statusd index 5be7b458..7af235c6 100755 --- a/usr/bin/byobu-statusd +++ b/usr/bin/byobu-statusd @@ -41,7 +41,7 @@ while true; do now=$(date +%s) # Re-source configuration, if changed since last run for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/status/statusrc" "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc" "$BYOBU_CONFIG_DIR/color" "${BYOBU_PREFIX}/lib/$PKG/."*; do - [ "$i" -nt "$BYOBU_RUN_DIR/status" ] && . "$i" + [ -r "$i" ] && [ "$i" -nt "$BYOBU_RUN_DIR/status" ] && . "$i" done for i in "$BYOBU_PREFIX/lib/$PKG/"*; do case "$i" in diff --git a/usr/lib/byobu/mem_available b/usr/lib/byobu/mem_available index 0355c134..ffb01cf5 100755 --- a/usr/lib/byobu/mem_available +++ b/usr/lib/byobu/mem_available @@ -25,7 +25,6 @@ __mem_available_detail() { __mem_available() { local mem_used comma whitespace unit mem name - . "$BYOBU_CONFIG_DIR/status" [ "$mem_used" = "1" ] && comma="," || whitespace=" " read name mem unit < /proc/meminfo if [ $mem -ge 1048576 ]; then diff --git a/usr/share/byobu/keybindings/f-keys b/usr/share/byobu/keybindings/f-keys index e0eed9bb..8005995d 100644 --- a/usr/share/byobu/keybindings/f-keys +++ b/usr/share/byobu/keybindings/f-keys @@ -31,7 +31,7 @@ bindkey -k k2 $BYOBU_BACKEND # F2 | Create new window bindkey -k k3 eval 'prev' 'fit' # F3 | Previous Window bindkey -k k4 eval 'next' 'fit' # F4 | Next Window register r ":source $BYOBU_CONFIG_DIR/profile^M" # | Goes with F5 definition -bindkey -k k5 eval 'exec killall -u $USER byobu-statusd' 'process x' 'process r' # F5 | Reload profile +bindkey -k k5 eval 'process x' 'process r' # F5 | Reload profile bindkey -k k6 detach # F6 | Detach from this session bindkey -k k7 copy # F7 | Enter copy/scrollback mode register t "A^[OH^k^h" # | Goes with the F8 definition diff --git a/usr/share/byobu/profiles/common b/usr/share/byobu/profiles/common index bd9f7db2..afdec5c7 100644 --- a/usr/share/byobu/profiles/common +++ b/usr/share/byobu/profiles/common @@ -28,6 +28,8 @@ msgminwait 0 defutf8 on deflogin on +# We don't need/want more than one byobu-statusd running per user +exec killall -u $USER byobu-statusd backtick 10 9999999 9999999 byobu-janitor backtick 11 9999999 9999999 printf "\005-1=" backtick 12 9999999 9999999 byobu-status color