mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
* usr/bin/byobu-janitor, usr/share/byobu/profiles/common: LP: #823581
- when a status item is disabled, remove the backtick command entirely from the current screen configuration; this *drastically* reduces the number of no-op byobu-status calls (60+ per minute, per session)
This commit is contained in:
parent
c4f91d33cb
commit
11f3d1e7c5
3 changed files with 20 additions and 1 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -10,6 +10,10 @@ byobu (4.29) unreleased; urgency=low
|
|||
- back and forth, back and forth on this color issue;
|
||||
the previous version looked terrible (too bold) on stock
|
||||
Ubuntu/gnome-terminal
|
||||
* usr/bin/byobu-janitor, usr/share/byobu/profiles/common: LP: #823581
|
||||
- when a status item is disabled, remove the backtick command entirely
|
||||
from the current screen configuration; this *drastically* reduces
|
||||
the number of no-op byobu-status calls (60+ per minute, per session)
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 10 Aug 2011 18:24:27 -0500
|
||||
|
||||
|
|
|
@ -23,9 +23,22 @@ PKG="byobu"
|
|||
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||
. "${BYOBU_PREFIX}/lib/${PKG}/.common"
|
||||
|
||||
FLAG="$BYOBU_RUN_DIR/reload-required"
|
||||
# Source configurations and disable unused backticks
|
||||
for i in "$BYOBU_PREFIX/share/$PKG/status/status" "$BYOBU_CONFIG_DIR/status"; do
|
||||
[ -r "$i" ] && . "$i"
|
||||
done
|
||||
rm -f "$BYOBU_CONFIG_DIR/backticks"
|
||||
for i in "$BYOBU_PREFIX/lib/$PKG/"*; do
|
||||
i=${i##*/}
|
||||
eval x="\$$i" || true
|
||||
if [ "$x" != "1" ]; then
|
||||
num=$(grep "^backtick.*byobu-status $i$" "$BYOBU_PREFIX/share/$PKG/profiles/common" | awk '{print $2}')
|
||||
[ -n "$num" ] && echo "backtick $num # $i" >> "$BYOBU_CONFIG_DIR/backticks"
|
||||
fi
|
||||
done
|
||||
|
||||
# Exit immediately, if we're not forced, and there is no reload flag
|
||||
FLAG="$BYOBU_RUN_DIR/reload-required"
|
||||
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
@ -52,6 +65,7 @@ fi
|
|||
[ -r "$BYOBU_CONFIG_DIR/profile.tmux" ] || echo "source-file $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"
|
||||
[ -r "$BYOBU_CONFIG_DIR/windows" ] || touch "$BYOBU_CONFIG_DIR/windows"
|
||||
[ -r "$BYOBU_CONFIG_DIR/backticks" ] || touch "$BYOBU_CONFIG_DIR/backticks"
|
||||
[ -r "$HOME/.screenrc" ] || touch "$HOME/.screenrc"
|
||||
for f in status statusrc; do
|
||||
if [ ! -r "$BYOBU_CONFIG_DIR/$f" ]; then
|
||||
|
|
|
@ -124,3 +124,4 @@ hardstatus string '%99`%{-}%{=r}%12` %100`%112`%=%117`%133`%130`%135`%102`%101`%
|
|||
# * http://savannah.gnu.org/bugs/?22146
|
||||
|
||||
source $BYOBU_CONFIG_DIR/keybindings
|
||||
source $BYOBU_CONFIG_DIR/backticks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue