mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
* etc/byobu/socketdir, usr/bin/byobu, usr/lib/byobu/date,
usr/lib/byobu/notify_osd, usr/share/byobu/keybindings/f-keys, usr/share/byobu/keybindings/screen-escape-keys, usr/share/byobu/profiles/common, usr/share/byobu/profiles/NONE, usr/share/byobu/profiles/tmux, usr/share/byobu/windows/common: - use a BYOBU_BACKEND environment variable, to support both screen and tmux
This commit is contained in:
parent
ce1be801c8
commit
e1cbc181ab
11 changed files with 35 additions and 28 deletions
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -8,6 +8,13 @@ byobu (4.18) unreleased; urgency=low
|
|||
usr/bin/byobu-select-session, usr/lib/byobu/.constants:
|
||||
- use a BYOBU_BACKEND environment variable, to support both screen
|
||||
and tmux
|
||||
* etc/byobu/socketdir, usr/bin/byobu, usr/lib/byobu/date,
|
||||
usr/lib/byobu/notify_osd, usr/share/byobu/keybindings/f-keys,
|
||||
usr/share/byobu/keybindings/screen-escape-keys,
|
||||
usr/share/byobu/profiles/common, usr/share/byobu/profiles/NONE,
|
||||
usr/share/byobu/profiles/tmux, usr/share/byobu/windows/common:
|
||||
- use a BYOBU_BACKEND environment variable, to support both screen
|
||||
and tmux
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 29 Jun 2011 02:26:28 +0000
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Set the location of the socket directory that byobu will use.
|
||||
# On Debian/Ubuntu systems, this is in /var/run/screen, but on
|
||||
# other distros, it might be elsewhere, such as /tmp/screens
|
||||
# depending on your screen compilation.
|
||||
# depending on your compilation.
|
||||
#
|
||||
# This file will be sourced by both shell scripts and python code,
|
||||
# so please ensure that:
|
||||
|
|
|
@ -75,7 +75,7 @@ if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ]; then
|
|||
fi
|
||||
|
||||
# Some users want to maintain separate configurations
|
||||
# if they use both screen and byobu on the same system
|
||||
# if they use both GNU Screen and byobu on the same system
|
||||
if [ -r "$HOME/.byoburc" ]; then
|
||||
PROFILE="-c $BYOBU_PREFIX/share/$PKG/profiles/byoburc"
|
||||
else
|
||||
|
|
|
@ -25,7 +25,7 @@ __date_detail() {
|
|||
|
||||
__date() {
|
||||
bd=$(date "+%m%d")
|
||||
[ "$bd" = "0320" ] && msg="$(echo SGFwcHkgQmlydGhkYXkgU2NyZWVuIC0tIGh0dHA6Ly9iaXQubHkvc2NyZWVuLWJkYXkK | base64 -di)" && screen -X -S "byobu" at "*" echo "[$msg]"
|
||||
[ "$bd" = "0320" ] && msg="$(echo SGFwcHkgQmlydGhkYXkgU2NyZWVuIC0tIGh0dHA6Ly9iaXQubHkvc2NyZWVuLWJkYXkK | base64 -di)" && $BYOBU_BACKEND -X -S "byobu" at "*" echo "[$msg]"
|
||||
color none; printf "\005Y-\005m-\005d"; color --
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# notify_osd: print notify-osd messages in screen's notification buffer
|
||||
# notify_osd: print notify-osd messages in the notification buffer
|
||||
#
|
||||
# Copyright (C) 2010 Canonical Ltd.
|
||||
# Copyright (C) 2011 Dustin Kirkland
|
||||
|
@ -28,7 +28,7 @@ __notify_osd_detail() {
|
|||
|
||||
__notify_osd() {
|
||||
# This line operates basically as a daemon, watching the notify-osd log file,
|
||||
# processing new messages and sending them to screen
|
||||
# processing new messages and sending them to the session
|
||||
CMD="tail --pid $PPID -n 0 -F $NOTIFY_OSD_LOG"
|
||||
pkill -f "$CMD" || true
|
||||
$CMD | $BYOBU_PREFIX/lib/byobu/.notify_osd "$PPID" &
|
||||
|
|
|
@ -25,9 +25,9 @@ escape ^^^^
|
|||
register x "^^" # | Goes with the F12 definition
|
||||
|
||||
# F-keys seem to work well in both gnome-terminal and tty consoles
|
||||
bindkey -k k1 screen -t config 0 byobu-config # F1 | Configuration (along with F9)
|
||||
bindkey -k k1 $BYOBU_BACKEND -t config 0 byobu-config # F1 | Configuration (along with F9)
|
||||
# | since F1 = Help in gnome-terminal
|
||||
bindkey -k k2 screen # F2 | Create new window
|
||||
bindkey -k k2 $BYOBU_BACKEND # F2 | Create new window
|
||||
bindkey -k k3 eval 'prev' 'fit' # F3 | Previous Window
|
||||
bindkey -k k4 eval 'next' 'fit' # F4 | Next Window
|
||||
register r ":source $BYOBU_CONFIG_DIR/profile^M" # | Goes with F5 definition
|
||||
|
@ -36,15 +36,15 @@ bindkey -k k6 detach # F6 | Detach from this session
|
|||
bindkey -k k7 copy # F7 | Enter copy/scrollback mode
|
||||
register t "A^[OH^k^h" # | Goes with the F8 definition
|
||||
bindkey -k k8 eval 'process x' 'process t' # F8 | Re-title a window
|
||||
bindkey -k k9 screen -t config 0 byobu-config # F9 | Configuration
|
||||
bindkey -k k9 $BYOBU_BACKEND -t config 0 byobu-config # F9 | Configuration
|
||||
# F10 | 'toolbar' in gnome-terminal
|
||||
# F11 | 'fullscreen' in gnome-terminal
|
||||
# F11 | 'Full Screen' in gnome-terminal
|
||||
bindkey -k F2 process x # F12 | Byobu's escape key
|
||||
bind $ screen -t status 0 byobu-status-detail # F12 $ | show detailed status
|
||||
bind @ screen -t config 0 byobu-config # F12 @ | Configuration
|
||||
bind $ $BYOBU_BACKEND -t status 0 byobu-status-detail # F12 $ | show detailed status
|
||||
bind @ $BYOBU_BACKEND -t config 0 byobu-config # F12 @ | Configuration
|
||||
bind R process r # F12 R | Reload profile
|
||||
register s "[g G$>^h" # Goes with F12 ~ definition
|
||||
bind ~ eval 'process x' 'process s' 'exec sed -i -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' 'screen -t PRINTSCREEN view $BYOBU_RUN_DIR/printscreen' # F12 ~ | write the buffer to file, open in a new window
|
||||
bind ~ eval 'process x' 'process s' 'exec sed -i -e "/./,/^$/!d" $BYOBU_RUN_DIR/printscreen' '$BYOBU_BACKEND -t PRINTSCREEN view $BYOBU_RUN_DIR/printscreen' # F12 ~ | write the buffer to file, open in a new window
|
||||
|
||||
# Hotkeys for splits (gnome-terminal)
|
||||
bindkey "^[O1;2Q" eval 'split' 'focus down' 'next' 'focus up' 'layout save byobu' 'layout autosave' # shift-F2 | horizontal split
|
||||
|
@ -79,4 +79,4 @@ bindkey "^[[32~" eval 'exec touch $BYOBU_RUN_DIR/no-logout' 'detach' # shift-F6
|
|||
register d ":source $BYOBU_PREFIX/share/byobu/keybindings/screen-escape-keys^M"
|
||||
bind ! eval 'process x' 'process d' 'backtick 111 9999999 9999999 byobu-status menu --disable-f-keys' # F12 ! | toggle on/off f-keys
|
||||
|
||||
bindkey "^A" screen -t ctrl-a byobu-ctrl-a
|
||||
bindkey "^A" $BYOBU_BACKEND -t ctrl-a byobu-ctrl-a
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
###############################################################################
|
||||
# Disable Byobu's f-key keybindings, define a set using screen's escape
|
||||
# Disable Byobu's f-key keybindings, define a set using Screen's escape
|
||||
# sequence.
|
||||
#
|
||||
# Copyright (C) 2009 Dustin Kirkland <kirkland@ubuntu.com>
|
||||
|
@ -18,9 +18,9 @@
|
|||
###############################################################################
|
||||
|
||||
# This file disables the f-key bindings, but retains the
|
||||
# keybindings that use screen's built-in escape sequence
|
||||
# keybindings that use Screen's built-in escape sequence
|
||||
|
||||
# Default screen escape
|
||||
# Default Screen escape
|
||||
escape ^Aa
|
||||
register x "^A"
|
||||
|
||||
|
@ -55,9 +55,9 @@ bind R eval 'process x' 'process r'
|
|||
# ctrl-a-[ Enter copy/scrollback mode F7
|
||||
# ctrl-a-A Re-title a window F8
|
||||
# ctrl-a-@ Configuration F9
|
||||
bind @ screen -t config 0 byobu-config
|
||||
bind @ $BYOBU_BACKEND -t config 0 byobu-config
|
||||
# ctrl-a-$ Show detailed status
|
||||
bind $ screen -t status 0 byobu-status-detail
|
||||
bind $ $BYOBU_BACKEND -t status 0 byobu-status-detail
|
||||
# ctrl-a-! Toggle f-key keybindings on
|
||||
register e ":source $BYOBU_PREFIX/share/byobu/keybindings/f-keys^M"
|
||||
bind ! eval 'process x' 'process e' 'backtick 111 9999999 9999999 byobu-status menu'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
###############################################################################
|
||||
# NONE
|
||||
# This configuration profile is the most basic, plain profile,
|
||||
# (the default one that ships with screen).
|
||||
# (the default one that ships with Screen).
|
||||
# To clarify that this *disables* byobu, let's call this profile
|
||||
# "NONE".
|
||||
#
|
||||
|
|
|
@ -81,8 +81,8 @@ backtick 137 23 23 byobu-status time_binary
|
|||
|
||||
hardstatus alwayslastline
|
||||
|
||||
# The following line would turn off alternate screen switching in xterms,
|
||||
# so that text in screen will go into the xterm's scrollback buffer.
|
||||
# The following line would turn off alternate Screen switching in xterms,
|
||||
# so that text in Screen will go into the xterm's scrollback buffer.
|
||||
# However, we are disabling this at this point, since byobu's
|
||||
# alt-pgup and alt-pgdn keybindings now exist.
|
||||
#termcapinfo xterm* ti@:te@
|
||||
|
@ -96,7 +96,7 @@ defbce "on"
|
|||
# Log 10000 lines
|
||||
defscrollback 10000
|
||||
|
||||
# Set per-user screen-exchange
|
||||
# Set per-user exchange
|
||||
bufferfile $BYOBU_RUN_DIR/printscreen
|
||||
compacthist on
|
||||
|
||||
|
@ -116,7 +116,7 @@ caption always "%12`%?%-Lw%50L>%?%{=r}%n*%f %t%?(%u)%?%{-}%12`%?%+Lw%?%11` %=%12
|
|||
# Status string, last line
|
||||
hardstatus string '%99`%{-}%{=r}%12` %100`%112`%=%117`%133`%130`%135`%102`%101`%129`%131`%127`%114`%115`%108`%134`%128`%125`%126`%113`%119`%116`%106`%104`%103`%105`%107`%136`%123`%137`%132`%120`%121`'
|
||||
|
||||
# NOTE: Older version of screen have an arbitrary limit of only being able
|
||||
# NOTE: Older version of Screen have an arbitrary limit of only being able
|
||||
# to change colors 16 times in this 'hardstatus string'.
|
||||
# Ubuntu (fixed in Jaunty):
|
||||
# * https://bugs.launchpad.net/bugs/315871
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###############################################################################
|
||||
|
||||
# Change to screen's ctrl-a escape sequence
|
||||
# Change to Screen's ctrl-a escape sequence
|
||||
set-option -g prefix C-a
|
||||
unbind-key C-b
|
||||
bind-key C-a send-prefix
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Default windows examples
|
||||
#screen -t notify-osd -M tail -f $HOME/.cache/notify-osd.log
|
||||
#screen -t top top
|
||||
#screen -t web w3m http://LinuxSearch.org
|
||||
#screen -t shell byobu-shell
|
||||
# $BYOBU_BACKEND -t notify-osd -M tail -f $HOME/.cache/notify-osd.log
|
||||
# $BYOBU_BACKEND -t top top
|
||||
# $BYOBU_BACKEND -t web w3m http://LinuxSearch.org
|
||||
# $BYOBU_BACKEND -t shell byobu-shell
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue