diff --git a/debian/changelog b/debian/changelog index 8255264f..9a826fda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,19 @@ 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 Wed, 10 Nov 2010 18:29:06 -0600 diff --git a/debian/templates b/debian/templates index a0fc03bd..a7cc46b3 100644 --- a/debian/templates +++ b/debian/templates @@ -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. This setting is system-wide, for all users logging into the system. 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'. diff --git a/etc/byobu/statusrc b/etc/byobu/statusrc index 9ecfea5f..67b63b3d 100644 --- a/etc/byobu/statusrc +++ b/etc/byobu/statusrc @@ -1,6 +1,6 @@ # statusrc # Byobu's default status notifications -# Override these in $HOME/.local/share/byobu/status +# Override these in $HOME/.byobu/status # # Copyright (C) 2009 Canonical Ltd. # diff --git a/usr/bin/byobu b/usr/bin/byobu index aa4a0202..1a0e2fb1 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -23,7 +23,7 @@ VERSION=3.9 export BYOBU_PREFIX [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen" 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 echo "ERROR: Cannot find $BYOBU_PREFIX/bin/$PKG" 2>&1 diff --git a/usr/bin/byobu-config b/usr/bin/byobu-config index 96cadb9f..c73f43a8 100755 --- a/usr/bin/byobu-config +++ b/usr/bin/byobu-config @@ -35,10 +35,7 @@ else: PREFIX = "/usr" SHARE=PREFIX+'/share/'+PKG DOC=PREFIX+'/share/doc/'+PKG -if os.getenv("XDG_DATA_HOME"): - DATA=os.getenv("XDG_DATA_HOME")+"/"+PKG -else: - DATA=HOME+"/.local/share/"+PKG +DATA=HOME+"/."+PKG if not os.path.exists(SHARE): SHARE = DATA+"/"+SHARE if not os.path.exists(DOC): diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index 0a205197..1af99283 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -20,29 +20,20 @@ # along with this program. If not, see . 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" [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen" RUN="$SOCKETDIR/S-$USER" FLAG="$RUN/$PKG.reload-required" -# Handle xdg migration -if [ -d "$HOME/.$PKG" ]; then - # Old dir exists - if [ ! -e "$DATA" ]; then - # New dir does not; rename and link back - 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 +# Let's get prepped to switch over to XDG one day; maintain symlink for now +mkdir -p "$XDG" +if [ -d "$DATA" ] && [ ! -h "$DATA" ]; then + mv -f "$DATA"/* "$DATA"/.* "$XDG" 2>/dev/null + rmdir "$DATA" fi -# Make the directory just in case -mkdir -p "$DATA" +ln -sf "$XDG" "$DATA" # Exit immediately, if we're not forced, and there is no reload flag if [ "$1" != "--force" ] && [ ! -e "$FLAG" ]; then diff --git a/usr/bin/byobu-launcher b/usr/bin/byobu-launcher index 115500a1..e485c3d9 100755 --- a/usr/bin/byobu-launcher +++ b/usr/bin/byobu-launcher @@ -18,7 +18,7 @@ # along with this program. If not, see . 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" export BYOBU_PREFIX diff --git a/usr/bin/byobu-launcher-install b/usr/bin/byobu-launcher-install index 88d52fb8..50704db3 100755 --- a/usr/bin/byobu-launcher-install +++ b/usr/bin/byobu-launcher-install @@ -19,7 +19,7 @@ # along with this program. If not, see . PKG="byobu" -[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" +DATA="$HOME/.$PKG" install_launcher() { printf "%s\n" 'case "$-" in *i*) byobu-launcher && exit 0; esac;' >> "$1" diff --git a/usr/bin/byobu-launcher-uninstall b/usr/bin/byobu-launcher-uninstall index 0e8518c4..b1a12da3 100755 --- a/usr/bin/byobu-launcher-uninstall +++ b/usr/bin/byobu-launcher-uninstall @@ -19,7 +19,7 @@ # along with this program. If not, see . 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 which gsed 2>/dev/null && SED="gsed" || SED="sed" diff --git a/usr/bin/byobu-select-profile b/usr/bin/byobu-select-profile index 3597cbdb..c1accbbf 100755 --- a/usr/bin/byobu-select-profile +++ b/usr/bin/byobu-select-profile @@ -23,6 +23,7 @@ # ./debian/rules get-po PKG="byobu" +DATA="$HOME/.$PKG" [ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr" export BYOBU_PREFIX [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen" diff --git a/usr/bin/byobu-status b/usr/bin/byobu-status index 5ac9a402..817ed789 100755 --- a/usr/bin/byobu-status +++ b/usr/bin/byobu-status @@ -18,7 +18,7 @@ # along with this program. If not, see . 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" export BYOBU_PREFIX diff --git a/usr/lib/byobu/.notify_osd b/usr/lib/byobu/.notify_osd index d6c308d4..e79294bb 100755 --- a/usr/lib/byobu/.notify_osd +++ b/usr/lib/byobu/.notify_osd @@ -24,7 +24,7 @@ $PKG = "byobu"; while () { # Ensure that the notify_osd indicator is enabled my $skip = 0; - open(F, "<$ENV{HOME}/.local/share/$PKG/status"); + open(F, "<$ENV{HOME}/.$PKG/status"); foreach my $i () { if ($i =~ /notify_osd=0/) { $skip = 1; diff --git a/usr/lib/byobu/custom b/usr/lib/byobu/custom index 967096e6..26258176 100755 --- a/usr/lib/byobu/custom +++ b/usr/lib/byobu/custom @@ -19,7 +19,7 @@ # along with this program. If not, see . PKG="byobu" -[ -d "$XDG_DATA_HOME" ] && DATA="$XDG_DATA_HOME/$PKG" || DATA="$HOME/.local/share/$PKG" +DATA="$HOME/.$PKG" [ -d "$DATA/bin" ] || exit 0 color 2>/dev/null || color() { true; } diff --git a/usr/lib/byobu/disk_io b/usr/lib/byobu/disk_io index d1f55fb5..f342fb31 100755 --- a/usr/lib/byobu/disk_io +++ b/usr/lib/byobu/disk_io @@ -18,7 +18,7 @@ # along with this program. If not, see . 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; } # Default to disk providing /, but let users override with MONITORED_DISK diff --git a/usr/lib/byobu/ec2_cost b/usr/lib/byobu/ec2_cost index f3075381..3c520b45 100755 --- a/usr/lib/byobu/ec2_cost +++ b/usr/lib/byobu/ec2_cost @@ -19,7 +19,7 @@ DETAIL=0 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" color 2>/dev/null || color() { true; } diff --git a/usr/lib/byobu/hostname b/usr/lib/byobu/hostname index 0263772c..ba0746ca 100755 --- a/usr/lib/byobu/hostname +++ b/usr/lib/byobu/hostname @@ -18,7 +18,7 @@ # along with this program. If not, see . 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; } if [ "$1" = "--detail" ]; then diff --git a/usr/lib/byobu/ip_address b/usr/lib/byobu/ip_address index bf08fee1..4bcbcaec 100755 --- a/usr/lib/byobu/ip_address +++ b/usr/lib/byobu/ip_address @@ -18,7 +18,7 @@ # along with this program. If not, see . 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; } if [ "$1" = "--detail" ]; then diff --git a/usr/lib/byobu/logo b/usr/lib/byobu/logo index e01e7a1d..5edbe271 100755 --- a/usr/lib/byobu/logo +++ b/usr/lib/byobu/logo @@ -18,6 +18,7 @@ # along with this program. If not, see . PKG="byobu" +DATA="$HOME/.$PKG" color 2>/dev/null || color() { true; } if [ "$1" = "--detail" ]; then diff --git a/usr/lib/byobu/mem_available b/usr/lib/byobu/mem_available index 156d5b9b..e3b1244f 100755 --- a/usr/lib/byobu/mem_available +++ b/usr/lib/byobu/mem_available @@ -18,7 +18,7 @@ # along with this program. If not, see . 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; } if [ "$1" = "--detail" ]; then diff --git a/usr/lib/byobu/menu b/usr/lib/byobu/menu index bc6a6caa..eaef8ec2 100755 --- a/usr/lib/byobu/menu +++ b/usr/lib/byobu/menu @@ -19,7 +19,7 @@ [ "$1" = "--detail" ] && exit 0 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; } [ -r "$DATA/keybindings" ] && bindings="$DATA/keybindings" || bindings="$HOME/.screenrc" diff --git a/usr/lib/byobu/network b/usr/lib/byobu/network index ce8ac3fa..6efed006 100755 --- a/usr/lib/byobu/network +++ b/usr/lib/byobu/network @@ -18,7 +18,7 @@ # along with this program. If not, see . 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; } # Allow interface overrides in $DATA/status diff --git a/usr/lib/byobu/reboot_required b/usr/lib/byobu/reboot_required index 39fdfe07..2ba0bf08 100755 --- a/usr/lib/byobu/reboot_required +++ b/usr/lib/byobu/reboot_required @@ -18,7 +18,7 @@ # along with this program. If not, see . 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; } reboot="/var/run/reboot-required" diff --git a/usr/lib/byobu/services b/usr/lib/byobu/services index 36cb2c5a..1c4269bd 100755 --- a/usr/lib/byobu/services +++ b/usr/lib/byobu/services @@ -20,6 +20,7 @@ PKG="byobu" +DATA="$HOME/.$PKG" color 2>/dev/null || color() { true; } # Users can define a list of SERVICES to monitor in $DATA/status diff --git a/usr/lib/byobu/updates_available b/usr/lib/byobu/updates_available index 1759e779..ac4950e1 100755 --- a/usr/lib/byobu/updates_available +++ b/usr/lib/byobu/updates_available @@ -18,7 +18,7 @@ # along with this program. If not, see . 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; } if [ "$1" = "--detail" -o "$1" = "--short" ]; then diff --git a/usr/share/byobu/keybindings/f-keys b/usr/share/byobu/keybindings/f-keys index c40feb37..aa72c74a 100644 --- a/usr/share/byobu/keybindings/f-keys +++ b/usr/share/byobu/keybindings/f-keys @@ -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 k3 prev # F3 | Previous 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 k6 detach # F6 | Detach from this session bindkey -k k7 copy # F7 | Enter copy/scrollback mode diff --git a/usr/share/byobu/keybindings/screen-escape-keys b/usr/share/byobu/keybindings/screen-escape-keys index 49250636..75103c3b 100644 --- a/usr/share/byobu/keybindings/screen-escape-keys +++ b/usr/share/byobu/keybindings/screen-escape-keys @@ -37,7 +37,7 @@ bindkey -k F2 # ctrl-a-p Previous window F3 # ctrl-a-n Next window F4 # 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 # ctrl-a-d Detach from this session F6 # ctrl-a-[ Enter copy/scrollback mode F7 diff --git a/usr/share/byobu/profiles/byoburc b/usr/share/byobu/profiles/byoburc index 9b1b749d..8305a051 100644 --- a/usr/share/byobu/profiles/byoburc +++ b/usr/share/byobu/profiles/byoburc @@ -19,6 +19,6 @@ # along with this program. If not, see . ############################################################################### -source $HOME/.local/share/byobu/profile +source $HOME/.byobu/profile source $BYOBU_WINDOWS source $HOME/.screenrc diff --git a/usr/share/byobu/profiles/common b/usr/share/byobu/profiles/common index f8d3bae6..34309e80 100644 --- a/usr/share/byobu/profiles/common +++ b/usr/share/byobu/profiles/common @@ -99,9 +99,9 @@ defmonitor on activity "" # 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 caption always "%12`%?%-Lw%50L>%?%{=r}%n*%f %t%?(%u)%?%{-}%12`%?%+Lw%?%11` %=%12`%110`%109`%122`%111`%10`%<" diff --git a/usr/share/man/man1/byobu.1 b/usr/share/man/man1/byobu.1 index fb329d43..f17ac285 100644 --- a/usr/share/man/man1/byobu.1 +++ b/usr/share/man/man1/byobu.1 @@ -10,7 +10,7 @@ Options to \fBbyobu\fP are simply passed through \fBscreen\fP(1). .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. -Note that DATA=\fI$HOME/.local/share/byobu\fP, per XDG Base Directory Specification. +Note that DATA=\fI$HOME/.byobu\fP. .SH STATUS NOTIFICATIONS