mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* usr/lib/byobu/session, usr/share/byobu/keybindings/f-keys.screen,
usr/share/byobu/keybindings/f-keys.screen.disable, usr/share/byobu/status/status: LP: #1255139 - add support for screen session names in the status item - only display when more than one session in tmux, always displayed by default in screen, where we have more real estate - support the Ctrl-F8 hotkey in screen too, to rename session
This commit is contained in:
parent
0c7fe8b772
commit
2462d47e90
5 changed files with 31 additions and 9 deletions
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -8,6 +8,13 @@ byobu (5.70) unreleased; urgency=low
|
|||
- change the rarely used Ctrl-F8 keybinding to rename the current
|
||||
session
|
||||
- move the restore-a-split-layout to Shift-Alt-F8
|
||||
* usr/lib/byobu/session, usr/share/byobu/keybindings/f-keys.screen,
|
||||
usr/share/byobu/keybindings/f-keys.screen.disable,
|
||||
usr/share/byobu/status/status: LP: #1255139
|
||||
- add support for screen session names in the status item
|
||||
- only display when more than one session in tmux, always displayed by
|
||||
default in screen, where we have more real estate
|
||||
- support the Ctrl-F8 hotkey in screen too, to rename session
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 17 Dec 2013 14:27:43 -0700
|
||||
|
||||
|
|
|
@ -24,12 +24,24 @@ __session_detail() {
|
|||
|
||||
__session() {
|
||||
# Note: This will only work in byobu-tmux
|
||||
local count=$(tmux list-sessions 2>/dev/null | wc -l)
|
||||
if [ $count -gt 1 ]; then
|
||||
color u W k; printf "$ICON_SESSION#S"; color --
|
||||
else
|
||||
echo
|
||||
fi
|
||||
case "$BYOBU_BACKEND" in
|
||||
tmux)
|
||||
local count=$(tmux list-sessions 2>/dev/null | wc -l)
|
||||
if [ $count -gt 1 ]; then
|
||||
color u W k; printf "${ICON_SESSION}#S"; color --
|
||||
else
|
||||
echo
|
||||
fi
|
||||
;;
|
||||
screen)
|
||||
local count=$(screen -ls | grep "^ .*\)$" | wc -l)
|
||||
if [ $count -gt 1 ]; then
|
||||
color u W k; printf "${ICON_SESSION}%S"; color --
|
||||
else
|
||||
echo
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# vi: syntax=sh ts=4 noexpandtab
|
||||
|
|
|
@ -68,7 +68,9 @@ register n "^[[6~"
|
|||
bindkey "^[[6;3~" eval 'msgwait 0' 'msgminwait 0' 'copy' 'process n' 'msgwait 1' 'echo "Byobu scrollback mode (alt-pgup / alt-pgdown)"' # alt-pagedn | scrollback
|
||||
register t "A^[OH^k^h" # | Goes with the F8 definition
|
||||
bindkey -k k8 eval 'process x' 'process t' # F8 | Re-title a window
|
||||
# No ctrl-F8 (restore layout) in Screen
|
||||
register u ":sessionname " # | Goes with the Ctrl-F8 definition
|
||||
bindkey "^[[19;5~" eval 'process x' 'process u' # Ctrl-F8 | Re-title a session
|
||||
# No alt-shift-F8 (restore layout) in Screen
|
||||
# No ctrl-shift-F8 (save layout) in Screen
|
||||
bindkey -k k9 $BYOBU_BACKEND -t config 0 byobu-config # F9 | Configuration
|
||||
register s "[g G$>^h" # Goes with Shift-F7 and F12 ~ definition
|
||||
|
|
|
@ -77,5 +77,6 @@ bindkey "^[[18;2~"
|
|||
bindkey "^[[5;3~"
|
||||
bindkey "^[[6;3~"
|
||||
bindkey -k k8
|
||||
bindkey "^[[19;5~"
|
||||
bindkey -k k9
|
||||
bindkey -k F2
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
# Screen has two status lines, with 4 quadrants for status
|
||||
screen_upper_left="color"
|
||||
screen_upper_right="color whoami hostname ip_address menu"
|
||||
screen_lower_left="color logo distro release #arch"
|
||||
screen_lower_left="color logo distro release #arch session"
|
||||
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 #session"
|
||||
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue