mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* usr/lib/byobu/include/cycle-status,
usr/lib/byobu/include/Makefile.am, usr/share/byobu/keybindings/f- keys.tmux, usr/share/byobu/status/status: LP: #887140 - support multiple toggle-able status lines - define one or more tmux_right lines in ~/.byobu/status - press Shift-F5 to toggle through
This commit is contained in:
parent
c03cda56af
commit
4b38b9deac
5 changed files with 51 additions and 1 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -9,6 +9,12 @@ byobu (5.0) unreleased; urgency=low
|
|||
usr/share/doc/byobu/help.tmux.txt:
|
||||
- put all of the status line functions under *-F5
|
||||
- put all of the split arrangement functions under *-F8
|
||||
* usr/lib/byobu/include/cycle-status,
|
||||
usr/lib/byobu/include/Makefile.am, usr/share/byobu/keybindings/f-
|
||||
keys.tmux, usr/share/byobu/status/status: LP: #887140
|
||||
- support multiple toggle-able status lines
|
||||
- define one or more tmux_right lines in ~/.byobu/status
|
||||
- press Shift-F5 to toggle through
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 18 Dec 2011 21:35:00 -0600
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
inclibdirdir = $(prefix)/lib/@PACKAGE@/include
|
||||
inclibdir_SCRIPTS = common constants dirs layout mondrian notify_osd shutil
|
||||
inclibdir_SCRIPTS = common constants cycle-status dirs layout mondrian notify_osd shutil
|
||||
|
|
41
usr/lib/byobu/include/cycle-status
Executable file
41
usr/lib/byobu/include/cycle-status
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# cycle-status: cycle the status bar through multiple configurations
|
||||
#
|
||||
# Copyright (C) 2011 Dustin Kirkland
|
||||
#
|
||||
# Authors: Dustin Kirkland <dustin.kirkland@gmail.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/>.
|
||||
|
||||
|
||||
# Find line number of the enabled tmux_right
|
||||
current=$(grep -n "^tmux_right=" "$BYOBU_CONFIG_DIR/status" | awk -F: '{print $1}' | tail -n1)
|
||||
|
||||
# Find next line number to enable
|
||||
all=$(grep -n "tmux_right=" "$BYOBU_CONFIG_DIR/status" | awk -F: '{print $1}')
|
||||
next=
|
||||
for i in $all $all; do
|
||||
if [ "$next" = "flagged" ]; then
|
||||
next="$i"
|
||||
break
|
||||
elif [ "$i" = "$current" ]; then
|
||||
next="flagged"
|
||||
fi
|
||||
done
|
||||
|
||||
# Disable all
|
||||
sed -i "s/^tmux_right=/#tmux_right=/" "$BYOBU_CONFIG_DIR/status"
|
||||
|
||||
# Enable the next one
|
||||
sed -i "${next}s/^#tmux_right=/tmux_right=/" "$BYOBU_CONFIG_DIR/status"
|
|
@ -50,6 +50,7 @@ bind-key -n C-Down resize-pane -D
|
|||
bind-key -n C-Left resize-pane -L
|
||||
bind-key -n C-Right resize-pane -R
|
||||
bind-key -n F5 source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
|
||||
bind-key -n S-F5 new-window -k "$BYOBU_PREFIX/lib/byobu/include/cycle-status" \; source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
|
||||
bind-key -n C-F5 send-keys ". $BYOBU_PREFIX/bin/byobu-reconnect-sockets" \; send-keys Enter
|
||||
bind-key -n C-S-F5 new-window -d "byobu-select-profile -r"
|
||||
bind-key -n F6 detach
|
||||
|
|
|
@ -30,4 +30,6 @@ screen_lower_right="color network #disk_io custom #entropy raid reboot_required
|
|||
|
||||
# Tmux has one status line, with 2 halves for status
|
||||
tmux_left="logo #distro release #arch"
|
||||
# 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 whoami hostname ip_address #time_utc disk date time"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue