mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-select-session, usr/lib/byobu/.common,
usr/lib/byobu/.constants, usr/lib/byobu/.dirs, usr/lib/byobu/Makefile.am, usr/share/byobu/profiles/common, usr/share/byobu/status/1, usr/share/byobu/status/2: - fix string bug in select session - re-add a couple of necessary backticks - update caption line to use new statusd cache - significantly reduce the number of mkdir -p commands
This commit is contained in:
parent
7c776d834f
commit
f651b4c91d
9 changed files with 72 additions and 27 deletions
8
debian/changelog
vendored
8
debian/changelog
vendored
|
@ -51,6 +51,14 @@ byobu (4.18) unreleased; urgency=low
|
|||
- drop the backtick commands for all the individual status functions
|
||||
- add the backtick commands for the 4 quadrants of status
|
||||
- update the hardstatus line accordingly
|
||||
* usr/bin/byobu-select-session, usr/lib/byobu/.common,
|
||||
usr/lib/byobu/.constants, usr/lib/byobu/.dirs,
|
||||
usr/lib/byobu/Makefile.am, usr/share/byobu/profiles/common,
|
||||
usr/share/byobu/status/1, usr/share/byobu/status/2:
|
||||
- fix string bug in select session
|
||||
- re-add a couple of necessary backticks
|
||||
- update caption line to use new statusd cache
|
||||
- significantly reduce the number of mkdir -p commands
|
||||
|
||||
[ James Spencer ]
|
||||
* usr/lib/byobu/.constants:
|
||||
|
|
|
@ -30,7 +30,7 @@ sessions = []
|
|||
text = []
|
||||
i = 0
|
||||
|
||||
output = commands.getoutput('%s -ls ', BYOBU_BACKEND)
|
||||
output = commands.getoutput('%s -ls ' % BYOBU_BACKEND)
|
||||
if output:
|
||||
for s in output.split("\n"):
|
||||
s = re.sub(r'\s+', ' ', s)
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [ -z "${BYOBU_INCLUDED_LIBS}" ]; then
|
||||
. "${BYOBU_PREFIX}/lib/${PKG}/.dirs"
|
||||
. "${BYOBU_PREFIX}/lib/${PKG}/.shutil"
|
||||
. "${BYOBU_PREFIX}/lib/${PKG}/.constants"
|
||||
BYOBU_INCLUDED_LIBS=1
|
||||
|
|
|
@ -20,30 +20,6 @@
|
|||
|
||||
PKG="byobu"
|
||||
|
||||
# Create and set the user configuration directory
|
||||
if [ -d "$XDG_CONFIG_HOME" ] && mkdir -p "$XDG_CONFIG_HOME/$PKG"; then
|
||||
export BYOBU_CONFIG_DIR="$XDG_CONFIG_HOME/$PKG"
|
||||
elif mkdir -p "$HOME/.$PKG"; then
|
||||
export BYOBU_CONFIG_DIR="$HOME/.$PKG"
|
||||
fi
|
||||
|
||||
# Grab the global, then local socket directory
|
||||
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir"
|
||||
[ -r "$BYOBU_CONFIG_DIR/socketdir" ] && . "$BYOBU_CONFIG_DIR/socketdir"
|
||||
|
||||
# Hopefully, we can make a runtime data directory in a tmpfs
|
||||
if [ -d "$XDG_CACHE_HOME" ] && mkdir -p "$XDG_CACHE_HOME/$PKG"; then
|
||||
export BYOBU_RUN_DIR="$XDG_CACHE_HOME/$PKG"
|
||||
elif mkdir -p "$SOCKETDIR/S-$USER/$PKG" 2>/dev/null; then
|
||||
export BYOBU_RUN_DIR="$SOCKETDIR/S-$USER/$PKG"
|
||||
elif mkdir -p "$HOME/.cache/$PKG"; then
|
||||
# But if not, we'll use a cache directory
|
||||
export BYOBU_RUN_DIR="$HOME/.cache/$PKG"
|
||||
fi
|
||||
|
||||
# Some users build and install byobu themselves, rather than from a distro
|
||||
[ -n "$BYOBU_PREFIX" ] || BYOBU_PREFIX="/usr"
|
||||
|
||||
# UTF8 support in the hardstatus is coming one day in Screen
|
||||
if [ "$UTF8" = "1" ]; then
|
||||
ICON_C="℃"
|
||||
|
|
51
usr/lib/byobu/.dirs
Executable file
51
usr/lib/byobu/.dirs
Executable file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# .dirs: some dirs needed by all library status scripts
|
||||
#
|
||||
# Copyright (C) 2011 Dustin Kirkland
|
||||
#
|
||||
# Authors: Dustin Kirkland <kirkland@ubuntu.com>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
PKG="byobu"
|
||||
|
||||
# Some users build and install byobu themselves, rather than from a distro
|
||||
[ -n "$BYOBU_PREFIX" ] || BYOBU_PREFIX="/usr"
|
||||
|
||||
# Create and export the user configuration directory
|
||||
if [ -d "$XDG_CONFIG_HOME" ]; then
|
||||
# Use XDG, as some users insist on such nonsense :-)
|
||||
export BYOBU_CONFIG_DIR="$XDG_CONFIG_HOME/$PKG"
|
||||
else
|
||||
# But fall back to classic config dir location
|
||||
export BYOBU_CONFIG_DIR="$HOME/.$PKG"
|
||||
fi
|
||||
[ -d "$BYOBU_CONFIG_DIR" ] || mkdir -p "$BYOBU_CONFIG_DIR"
|
||||
|
||||
# Grab the global, then local socket directory
|
||||
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir"
|
||||
[ -r "$BYOBU_CONFIG_DIR/socketdir" ] && . "$BYOBU_CONFIG_DIR/socketdir"
|
||||
|
||||
# Create and export the runtime cache directory
|
||||
if [ -d "$XDG_CACHE_HOME" ]; then
|
||||
# Use XDG, as some users insist on such nonsense :-)
|
||||
export BYOBU_RUN_DIR="$XDG_CACHE_HOME/$PKG"
|
||||
elif [ -d "$SOCKETDIR/S-$USER" ]; then
|
||||
# But for FAR better performance, use a tmpfs if available
|
||||
export BYOBU_RUN_DIR="$SOCKETDIR/S-$USER/$PKG"
|
||||
else
|
||||
# But if not, we'll use a cache directory
|
||||
export BYOBU_RUN_DIR="$HOME/.cache/$PKG"
|
||||
fi
|
||||
[ -d "$BYOBU_RUN_DIR" ] || mkdir -p "$BYOBU_RUN_DIR"
|
|
@ -1,3 +1,3 @@
|
|||
libdirdir = $(prefix)/lib/@PACKAGE@
|
||||
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io ec2_cost fan_speed hostname ip_address load_average logo mail mem_available mem_used menu network .notify_osd notify_osd processes raid rcs_cost reboot_required release services swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality .common .constants .shutil
|
||||
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io ec2_cost fan_speed hostname ip_address load_average logo mail mem_available mem_used menu network .notify_osd notify_osd processes raid rcs_cost reboot_required release services swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality .common .constants .dirs .shutil
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@ defutf8 on
|
|||
deflogin on
|
||||
|
||||
backtick 10 9999999 9999999 byobu-janitor
|
||||
backtick 11 9999999 9999999 printf "\005-1="
|
||||
backtick 12 9999999 9999999 byobu-status color
|
||||
backtick 13 0 0 byobu-status notify_osd
|
||||
backtick 1000 0 0 run-this-one byobu-statusd
|
||||
backtick 1001 1 1 byobu-status-print 1
|
||||
backtick 1002 1 1 byobu-status-print 2
|
||||
backtick 1003 1 1 byobu-status-print 3
|
||||
|
@ -64,7 +68,7 @@ fit
|
|||
setenv SSH_AUTH_SOCK $BYOBU_CONFIG_DIR/.ssh-agent
|
||||
|
||||
# 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`%1001`%?%-Lw%50L>%?%{=r}%n*%f %t%?(%u)%?%{-}%12`%?%+Lw%?%11` %=%12`%1002`%10`%<"
|
||||
|
||||
# Status string, last line
|
||||
hardstatus alwayslastline
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
color
|
|
@ -0,0 +1,4 @@
|
|||
whoami
|
||||
hostname
|
||||
ip_address
|
||||
menu
|
Loading…
Add table
Add a link
Reference in a new issue