* usr/lib/byobu/include/shutil, usr/lib/byobu/Makefile.am,

usr/lib/byobu/session, usr/share/byobu/status/status,
  usr/share/man/man1/byobu.1:
  - add a new status item, to show the session name
This commit is contained in:
Dustin Kirkland 2013-12-03 18:16:54 +00:00
commit f81e017755
6 changed files with 39 additions and 3 deletions

5
debian/changelog vendored
View file

@ -1,6 +1,9 @@
byobu (5.68) unreleased; urgency=low
* UNRELEASED
* usr/lib/byobu/include/shutil, usr/lib/byobu/Makefile.am,
usr/lib/byobu/session, usr/share/byobu/status/status,
usr/share/man/man1/byobu.1:
- add a new status item, to show the session name
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 02 Dec 2013 18:46:28 -0600

View file

@ -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 distro entropy ec2_cost fan_speed hostname ip_address load_average logo mail memory menu network processes raid rcs_cost reboot_required release services swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality
libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy ec2_cost fan_speed hostname ip_address load_average logo mail memory menu network processes raid rcs_cost reboot_required release services session swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality

View file

@ -265,6 +265,7 @@ status_freq() {
reboot_required) _RET=5 ;;
release) _RET=599 ;;
services) _RET=53 ;;
session) _RET=9999999 ;;
swap) _RET=19 ;;
time) [ "$BYOBU_BACKEND" = "tmux" ] && _RET=1 || _RET=9999999 ;;
time_binary) _RET=23 ;;

30
usr/lib/byobu/session Executable file
View file

@ -0,0 +1,30 @@
#!/bin/sh -e
#
# session: tmux session name
#
# Copyright (C) 2013 Dustin Kirkland <kirkland@byobu.co>
#
# Authors: Dustin Kirkland <kirkland@byobu.co>
#
# 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/>.
__session_detail() {
tmux list-sessions
}
__session() {
# Note: This will only work in byobu-tmux
color u W k; echo "#S"; color --
}
# vi: syntax=sh ts=4 noexpandtab

View file

@ -29,7 +29,7 @@ screen_lower_left="color logo distro release #arch"
screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time"
# Tmux has one status line, with 2 halves for status
tmux_left="logo #distro release #arch"
tmux_left="logo #distro release #arch #session"
# You can have as many tmux right lines below here, and cycle through them using Shift-F5
tmux_right="#network #disk_io #custom #entropy raid reboot_required updates_available #apport #services #mail #users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp #battery #wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname #ip_address #time_utc date time"
#tmux_right="network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost fan_speed cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk whoami hostname ip_address #time_utc date time"

View file

@ -91,6 +91,8 @@ The background colors of the \fBbyobu\fP status lines can be adjusted by editing
\fBservices\fP \- users can configure a list of services to monitor, define the SERVICES variable in \fI$BYOBU_CONFIG_DIR/statusrc\fP, a whitespace separated of services, each service should include the init name of the service, then a pipe, and then an abbreviated name or symbol to display when running (e.g. SERVICES="ssh|ssh apache2|http"); displayed in the lower bar toward the center in cyan on a white background
\fBsession\fP \- byobu session name (only supported in \fBbyobu-tmux\fP(1)); displayed in the lower bar on the left in underlined black text on a white background
\fBswap\fP \- total swap space and total used as a percentage of the total available; displayed in the lower bar toward the right in white text on a light green background with a trailing '%' sign
\fBtime\fP \- the system time in HH:MM:SS format; displayed in the lower bar on the far right in the default text and default background colors