debian/templates, etc/byobu/statusrc, usr/bin/byobu, usr/bin/byobu-

config, usr/bin/byobu-janitor, usr/bin/byobu-launcher,
usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall,
usr/bin/byobu-select-profile, usr/bin/byobu-status,
usr/lib/byobu/custom, usr/lib/byobu/disk_io, usr/lib/byobu/ec2_cost,
usr/lib/byobu/hostname, usr/lib/byobu/ip_address,
usr/lib/byobu/logo, usr/lib/byobu/mem_available, usr/lib/byobu/menu,
usr/lib/byobu/network, usr/lib/byobu/.notify_osd,
usr/lib/byobu/reboot_required, usr/lib/byobu/services,
usr/lib/byobu/updates_available, usr/share/byobu/keybindings/f-keys,
usr/share/byobu/keybindings/screen-escape-keys,
usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common,
usr/share/man/man1/byobu.1: clean up the broken xdg changes,
maintain both the xdg dir and a symlink for now;  LP: #674217
This commit is contained in:
Dustin Kirkland 2010-11-12 22:28:03 -06:00
commit f44dac2f8a
29 changed files with 50 additions and 46 deletions

15
debian/changelog vendored
View file

@ -1,6 +1,19 @@
byobu (3.9) unreleased; urgency=low byobu (3.9) unreleased; urgency=low
* usr/bin/byobu-janitor: move hidden files too * debian/templates, etc/byobu/statusrc, usr/bin/byobu, usr/bin/byobu-
config, usr/bin/byobu-janitor, usr/bin/byobu-launcher,
usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall,
usr/bin/byobu-select-profile, usr/bin/byobu-status,
usr/lib/byobu/custom, usr/lib/byobu/disk_io, usr/lib/byobu/ec2_cost,
usr/lib/byobu/hostname, usr/lib/byobu/ip_address,
usr/lib/byobu/logo, usr/lib/byobu/mem_available, usr/lib/byobu/menu,
usr/lib/byobu/network, usr/lib/byobu/.notify_osd,
usr/lib/byobu/reboot_required, usr/lib/byobu/services,
usr/lib/byobu/updates_available, usr/share/byobu/keybindings/f-keys,
usr/share/byobu/keybindings/screen-escape-keys,
usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common,
usr/share/man/man1/byobu.1: clean up the broken xdg changes,
maintain both the xdg dir and a symlink for now; LP: #674217
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 10 Nov 2010 18:29:06 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Wed, 10 Nov 2010 18:29:06 -0600

2
debian/templates vendored
View file

@ -8,4 +8,4 @@ _Description: Do you want to launch Byobu at shell login for all users?
If you select this option, Byobu will install a symlink in /etc/profile.d. If you select this option, Byobu will install a symlink in /etc/profile.d.
This setting is system-wide, for all users logging into the system. This setting is system-wide, for all users logging into the system.
Individual users can disable this by touching Individual users can disable this by touching
~/.local/share/byobu/disable-autolaunch, or configuring with 'byobu-config'. ~/.byobu/disable-autolaunch, or configuring with 'byobu-config'.

View file

@ -1,6 +1,6 @@
# statusrc # statusrc
# Byobu's default status notifications # Byobu's default status notifications
# Override these in $HOME/.local/share/byobu/status # Override these in $HOME/.byobu/status
# #
# Copyright (C) 2009 Canonical Ltd. # Copyright (C) 2009 Canonical Ltd.
# #

View file

@ -23,7 +23,7 @@ VERSION=3.9
export BYOBU_PREFIX export BYOBU_PREFIX
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen" [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"
RUN="$SOCKETDIR/S-$USER" RUN="$SOCKETDIR/S-$USER"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
if [ ! -x "$BYOBU_PREFIX/bin/$PKG" ]; then if [ ! -x "$BYOBU_PREFIX/bin/$PKG" ]; then
echo "ERROR: Cannot find $BYOBU_PREFIX/bin/$PKG" 2>&1 echo "ERROR: Cannot find $BYOBU_PREFIX/bin/$PKG" 2>&1

View file

@ -35,10 +35,7 @@ else:
PREFIX = "/usr" PREFIX = "/usr"
SHARE=PREFIX+'/share/'+PKG SHARE=PREFIX+'/share/'+PKG
DOC=PREFIX+'/share/doc/'+PKG DOC=PREFIX+'/share/doc/'+PKG
if os.getenv("XDG_DATA_HOME"): DATA=HOME+"/."+PKG
DATA=os.getenv("XDG_DATA_HOME")+"/"+PKG
else:
DATA=HOME+"/.local/share/"+PKG
if not os.path.exists(SHARE): if not os.path.exists(SHARE):
SHARE = DATA+"/"+SHARE SHARE = DATA+"/"+SHARE
if not os.path.exists(DOC): if not os.path.exists(DOC):

View file

@ -20,29 +20,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
XDG="$HOME/.local/share/$PKG"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr" [ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen" [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"
RUN="$SOCKETDIR/S-$USER" RUN="$SOCKETDIR/S-$USER"
FLAG="$RUN/$PKG.reload-required" FLAG="$RUN/$PKG.reload-required"
# Handle xdg migration # Let's get prepped to switch over to XDG one day; maintain symlink for now
if [ -d "$HOME/.$PKG" ]; then mkdir -p "$XDG"
# Old dir exists if [ -d "$DATA" ] && [ ! -h "$DATA" ]; then
if [ ! -e "$DATA" ]; then mv -f "$DATA"/* "$DATA"/.* "$XDG" 2>/dev/null
# New dir does not; rename and link back rmdir "$DATA"
mkdir -p $(dirname "$DATA")
mv -f "$HOME/.$PKG" "$DATA"
ln -sf "$DATA" "$HOME/.$PKG"
elif [ -d "$DATA" ]; then
# Old and new dir exist; migrate files from old to new
mv -f "$HOME/.$PKG/"* "$HOME/.$PKG/".* "$DATA" 2>/dev/null
rmdir "$HOME/.$PKG"
ln -sf "$DATA" "$HOME/.$PKG"
fi
fi fi
# Make the directory just in case ln -sf "$XDG" "$DATA"
mkdir -p "$DATA"
# Exit immediately, if we're not forced, and there is no reload flag # Exit immediately, if we're not forced, and there is no reload flag
if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr" [ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
export BYOBU_PREFIX export BYOBU_PREFIX

View file

@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
install_launcher() { install_launcher() {
printf "%s\n" 'case "$-" in *i*) byobu-launcher && exit 0; esac;' >> "$1" printf "%s\n" 'case "$-" in *i*) byobu-launcher && exit 0; esac;' >> "$1"

View file

@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
# Use gsed on non-Linux OS's # Use gsed on non-Linux OS's
which gsed 2>/dev/null && SED="gsed" || SED="sed" which gsed 2>/dev/null && SED="gsed" || SED="sed"

View file

@ -23,6 +23,7 @@
# ./debian/rules get-po # ./debian/rules get-po
PKG="byobu" PKG="byobu"
DATA="$HOME/.$PKG"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr" [ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
export BYOBU_PREFIX export BYOBU_PREFIX
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen" [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr" [ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
export BYOBU_PREFIX export BYOBU_PREFIX

View file

@ -24,7 +24,7 @@ $PKG = "byobu";
while (<STDIN>) { while (<STDIN>) {
# Ensure that the notify_osd indicator is enabled # Ensure that the notify_osd indicator is enabled
my $skip = 0; my $skip = 0;
open(F, "<$ENV{HOME}/.local/share/$PKG/status"); open(F, "<$ENV{HOME}/.$PKG/status");
foreach my $i (<F>) { foreach my $i (<F>) {
if ($i =~ /notify_osd=0/) { if ($i =~ /notify_osd=0/) {
$skip = 1; $skip = 1;

View file

@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
[ -d "$DATA/bin" ] || exit 0 [ -d "$DATA/bin" ] || exit 0
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
# Default to disk providing /, but let users override with MONITORED_DISK # Default to disk providing /, but let users override with MONITORED_DISK

View file

@ -19,7 +19,7 @@
DETAIL=0 DETAIL=0
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
[ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr" [ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
if [ "$1" = "--detail" ]; then if [ "$1" = "--detail" ]; then

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
if [ "$1" = "--detail" ]; then if [ "$1" = "--detail" ]; then

View file

@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
if [ "$1" = "--detail" ]; then if [ "$1" = "--detail" ]; then

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
if [ "$1" = "--detail" ]; then if [ "$1" = "--detail" ]; then

View file

@ -19,7 +19,7 @@
[ "$1" = "--detail" ] && exit 0 [ "$1" = "--detail" ] && exit 0
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
[ -r "$DATA/keybindings" ] && bindings="$DATA/keybindings" || bindings="$HOME/.screenrc" [ -r "$DATA/keybindings" ] && bindings="$DATA/keybindings" || bindings="$HOME/.screenrc"

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
# Allow interface overrides in $DATA/status # Allow interface overrides in $DATA/status

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
reboot="/var/run/reboot-required" reboot="/var/run/reboot-required"

View file

@ -20,6 +20,7 @@
PKG="byobu" PKG="byobu"
DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
# Users can define a list of SERVICES to monitor in $DATA/status # Users can define a list of SERVICES to monitor in $DATA/status

View file

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" PKG="byobu"
[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" DATA="$HOME/.$PKG"
color 2>/dev/null || color() { true; } color 2>/dev/null || color() { true; }
if [ "$1" = "--detail" -o "$1" = "--short" ]; then if [ "$1" = "--detail" -o "$1" = "--short" ]; then

View file

@ -25,7 +25,7 @@ bindkey -k k1 screen -t config 0 byobu-config # F1 | Configuration (along with
bindkey -k k2 screen # F2 | Create new window bindkey -k k2 screen # F2 | Create new window
bindkey -k k3 prev # F3 | Previous Window bindkey -k k3 prev # F3 | Previous Window
bindkey -k k4 next # F4 | Next Window bindkey -k k4 next # F4 | Next Window
register r "^a:source $HOME/.local/share/byobu/profile^M" # | Goes with F5 definition register r "^a:source $HOME/.byobu/profile^M" # | Goes with F5 definition
bindkey -k k5 eval 'fit' 'process r' # F5 | Reload profile bindkey -k k5 eval 'fit' 'process r' # F5 | Reload profile
bindkey -k k6 detach # F6 | Detach from this session bindkey -k k6 detach # F6 | Detach from this session
bindkey -k k7 copy # F7 | Enter copy/scrollback mode bindkey -k k7 copy # F7 | Enter copy/scrollback mode

View file

@ -37,7 +37,7 @@ bindkey -k F2
# ctrl-a-p Previous window F3 # ctrl-a-p Previous window F3
# ctrl-a-n Next window F4 # ctrl-a-n Next window F4
# ctrl-a-R Reload profile F5 # ctrl-a-R Reload profile F5
register r "^a:source $HOME/.local/share/byobu/profile^M" register r "^a:source $HOME/.byobu/profile^M"
bind R process r bind R process r
# ctrl-a-d Detach from this session F6 # ctrl-a-d Detach from this session F6
# ctrl-a-[ Enter copy/scrollback mode F7 # ctrl-a-[ Enter copy/scrollback mode F7

View file

@ -19,6 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
############################################################################### ###############################################################################
source $HOME/.local/share/byobu/profile source $HOME/.byobu/profile
source $BYOBU_WINDOWS source $BYOBU_WINDOWS
source $HOME/.screenrc source $HOME/.screenrc

View file

@ -99,9 +99,9 @@ defmonitor on
activity "" activity ""
# Maintain SSH_AUTH_SOCK link # Maintain SSH_AUTH_SOCK link
setenv SSH_AUTH_SOCK $HOME/.local/share/byobu/.ssh-agent setenv SSH_AUTH_SOCK $HOME/.byobu/.ssh-agent
source $HOME/.local/share/byobu/keybindings source $HOME/.byobu/keybindings
# Window tabs, second to last line # 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`%<" caption always "%12`%?%-Lw%50L>%?%{=r}%n*%f %t%?(%u)%?%{-}%12`%?%+Lw%?%11` %=%12`%110`%109`%122`%111`%10`%<"

View file

@ -10,7 +10,7 @@ Options to \fBbyobu\fP are simply passed through \fBscreen\fP(1).
.SH DESCRIPTION .SH DESCRIPTION
\fBbyobu\fP is a script that launches GNU screen in the byobu configuration. This enables the display of system information and status notifications within two lines at the bottom of the screen session. It also enables multiple tabbed terminal sessions, accessible through simple keystrokes. \fBbyobu\fP is a script that launches GNU screen in the byobu configuration. This enables the display of system information and status notifications within two lines at the bottom of the screen session. It also enables multiple tabbed terminal sessions, accessible through simple keystrokes.
Note that DATA=\fI$HOME/.local/share/byobu\fP, per XDG Base Directory Specification. Note that DATA=\fI$HOME/.byobu\fP.
.SH STATUS NOTIFICATIONS .SH STATUS NOTIFICATIONS