diff --git a/debian/changelog b/debian/changelog index a25f1ede..266a7fa6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 02 Dec 2013 18:46:28 -0600 diff --git a/usr/lib/byobu/Makefile.am b/usr/lib/byobu/Makefile.am index 80dcbecf..27d1cc77 100644 --- a/usr/lib/byobu/Makefile.am +++ b/usr/lib/byobu/Makefile.am @@ -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 diff --git a/usr/lib/byobu/include/shutil b/usr/lib/byobu/include/shutil index 547f6367..90ea77b8 100755 --- a/usr/lib/byobu/include/shutil +++ b/usr/lib/byobu/include/shutil @@ -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 ;; diff --git a/usr/lib/byobu/session b/usr/lib/byobu/session new file mode 100755 index 00000000..62fc8ad4 --- /dev/null +++ b/usr/lib/byobu/session @@ -0,0 +1,30 @@ +#!/bin/sh -e +# +# session: tmux session name +# +# Copyright (C) 2013 Dustin Kirkland +# +# 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 . + +__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 diff --git a/usr/share/byobu/status/status b/usr/share/byobu/status/status index 63eae371..f5ffc21f 100644 --- a/usr/share/byobu/status/status +++ b/usr/share/byobu/status/status @@ -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" diff --git a/usr/share/man/man1/byobu.1 b/usr/share/man/man1/byobu.1 index d84dd3d4..a81963de 100644 --- a/usr/share/man/man1/byobu.1 +++ b/usr/share/man/man1/byobu.1 @@ -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