From 8eaa514094a577df91a3f1a5075a559e5875bd99 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 10 May 2011 22:53:27 +0200 Subject: [PATCH] * usr/bin/byobu-quiet, usr/bin/byobu-status, usr/bin/Makefile.am, usr/share/byobu/profiles/common: LP: #780380 - add a byobu-quiet utility, to silence eyecandy --- debian/changelog | 3 +++ usr/bin/Makefile.am | 2 +- usr/bin/byobu-quiet | 34 +++++++++++++++++++++++++++++++++ usr/bin/byobu-status | 2 ++ usr/share/byobu/profiles/common | 4 ++-- 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100755 usr/bin/byobu-quiet diff --git a/debian/changelog b/debian/changelog index 2a88f655..35d2623d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,6 +47,9 @@ byobu (3.35c) unreleased; urgency=low * usr/share/byobu/keybindings/f-keys, usr/share/byobu/keybindings/screen-escape-keys: - simplify all calls to the screen escape key + * usr/bin/byobu-quiet, usr/bin/byobu-status, usr/bin/Makefile.am, + usr/share/byobu/profiles/common: LP: #780380 + - add a byobu-quiet utility, to silence eyecandy -- Dustin Kirkland Tue, 03 May 2011 12:11:10 -0500 diff --git a/usr/bin/Makefile.am b/usr/bin/Makefile.am index 8a6a594d..500103a2 100644 --- a/usr/bin/Makefile.am +++ b/usr/bin/Makefile.am @@ -1,2 +1,2 @@ -bin_SCRIPTS = byobu byobu-config byobu-ctrl-a byobu-disable byobu-enable byobu-export byobu-janitor byobu-launch byobu-launcher byobu-launcher-install byobu-launcher-uninstall byobu-reconnect-sockets byobu-select-profile byobu-select-session byobu-status byobu-status-detail shell +bin_SCRIPTS = byobu byobu-config byobu-ctrl-a byobu-disable byobu-enable byobu-export byobu-janitor byobu-launch byobu-launcher byobu-launcher-install byobu-launcher-uninstall byobu-quiet byobu-reconnect-sockets byobu-select-profile byobu-select-session byobu-status byobu-status-detail shell diff --git a/usr/bin/byobu-quiet b/usr/bin/byobu-quiet new file mode 100755 index 00000000..a1b78d9b --- /dev/null +++ b/usr/bin/byobu-quiet @@ -0,0 +1,34 @@ +#!/bin/sh +# +# byobu-quiet - disable the hardstatus and all indicators +# Copyright (C) 2011 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +PKG="byobu" +FLAG="$HOME/.$PKG/status.disable" + +# Clean up environment +sed -i "/hardstatus/d" "$HOME/.$PKG/keybindings" || true +if [ "$1" = "--undo" ]; then + rm -f "$FLAG" +else + touch "$FLAG" + # BUG: Need to make this dynamic and following + status="$USER@$(hostname)" + echo "hardstatus lastline '$status'" >> "$HOME/.$PKG/keybindings" +fi +screen -X at 0 source "$HOME/.$PKG/profile" diff --git a/usr/bin/byobu-status b/usr/bin/byobu-status index acf369d8..3b9df03c 100755 --- a/usr/bin/byobu-status +++ b/usr/bin/byobu-status @@ -88,8 +88,10 @@ case "$P" in printf "$ESC{= $BACKGROUND$FOREGROUND}" ;; *) + [ -f "$HOME/.$PKG/status.disable" ] && exit 0 eval x="\$$P" || exit 1 [ "$x" = "1" ] || exit 0 shift . $(find_script "$P") "$@" + ;; esac diff --git a/usr/share/byobu/profiles/common b/usr/share/byobu/profiles/common index ab14209d..e9f9a6c0 100644 --- a/usr/share/byobu/profiles/common +++ b/usr/share/byobu/profiles/common @@ -114,8 +114,6 @@ layout autosave # Maintain SSH_AUTH_SOCK link setenv SSH_AUTH_SOCK $HOME/.byobu/.ssh-agent -source $HOME/.byobu/keybindings - # Window tabs, second to last line caption always "%12`%?%-Lw%50L>%?%{=r}%n*%f %t%?(%u)%?%{-}%12`%?%+Lw%?%11` %=%12`%110`%109`%122`%111`%10`%<" @@ -128,3 +126,5 @@ hardstatus string '%99`%{-}%{=r}%12` %100`%112`%=%117`%133`%130`%135`%102`%101`% # * https://bugs.launchpad.net/bugs/315871 # Upstream: # * http://savannah.gnu.org/bugs/?22146 + +source $HOME/.byobu/keybindings