mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-status, usr/lib/byobu/include/constants,
usr/lib/byobu/include/icons, usr/lib/byobu/include/Makefile.am, usr/lib/byobu/include/toggle-utf8, usr/share/byobu/keybindings/f- keys.tmux, usr/share/byobu/keybindings/f-keys.tmux.disable, usr/share/doc/byobu/help.tmux.txt: - add a new keybiding, Alt-F5, to toggle UTF-8 on and off
This commit is contained in:
parent
0769428cd8
commit
6b1b407f24
9 changed files with 133 additions and 55 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -13,6 +13,12 @@ byobu (5.59) unreleased; urgency=low
|
||||||
- allow disable of utf8 prompt via BYOBU_CHARMAP variable
|
- allow disable of utf8 prompt via BYOBU_CHARMAP variable
|
||||||
* usr/lib/byobu/logo:
|
* usr/lib/byobu/logo:
|
||||||
- support Unicode logo for CentOS
|
- support Unicode logo for CentOS
|
||||||
|
* usr/bin/byobu-status, usr/lib/byobu/include/constants,
|
||||||
|
usr/lib/byobu/include/icons, usr/lib/byobu/include/Makefile.am,
|
||||||
|
usr/lib/byobu/include/toggle-utf8, usr/share/byobu/keybindings/f-
|
||||||
|
keys.tmux, usr/share/byobu/keybindings/f-keys.tmux.disable,
|
||||||
|
usr/share/doc/byobu/help.tmux.txt:
|
||||||
|
- add a new keybiding, Alt-F5, to toggle UTF-8 on and off
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 12 Sep 2013 10:53:27 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 12 Sep 2013 10:53:27 -0500
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ PKG="byobu"
|
||||||
for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/status/statusrc" "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc" "$BYOBU_CONFIG_DIR/color" "$BYOBU_CONFIG_DIR/color.tmux"; do
|
for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/status/statusrc" "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc" "$BYOBU_CONFIG_DIR/color" "$BYOBU_CONFIG_DIR/color.tmux"; do
|
||||||
[ -r "$i" ] && . "$i"
|
[ -r "$i" ] && . "$i"
|
||||||
done
|
done
|
||||||
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/icons"
|
||||||
|
|
||||||
case "$BYOBU_BACKEND" in
|
case "$BYOBU_BACKEND" in
|
||||||
screen)
|
screen)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
inclibdirdir = $(prefix)/lib/@PACKAGE@/include
|
inclibdirdir = $(prefix)/lib/@PACKAGE@/include
|
||||||
inclibdir_SCRIPTS = common constants cycle-status dirs mondrian notify_osd shutil ec2instancespricing.py tmux-detach-all-but-current-client
|
inclibdir_SCRIPTS = common constants cycle-status dirs icons mondrian notify_osd shutil ec2instancespricing.py tmux-detach-all-but-current-client toggle-utf8
|
||||||
|
|
|
@ -20,59 +20,8 @@
|
||||||
|
|
||||||
PKG="byobu"
|
PKG="byobu"
|
||||||
|
|
||||||
# UTF-8 support in the hardstatus is coming one day in Screen
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/icons"
|
||||||
if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then
|
|
||||||
#ICON_C="℃"
|
|
||||||
#ICON_F="℉"
|
|
||||||
ICON_C="C"
|
|
||||||
ICON_F="F"
|
|
||||||
ICON_RD="◂"
|
|
||||||
ICON_WR="▸"
|
|
||||||
ICON_MAIL="⍌"
|
|
||||||
ICON_UP="▴"
|
|
||||||
ICON_DN="▾"
|
|
||||||
ICON_TRASH="♸"
|
|
||||||
ICON_WIFI=
|
|
||||||
ICON_REBOOT="⟳"
|
|
||||||
ICON_UPDATES="!"
|
|
||||||
ICON_SECURITY="‼"
|
|
||||||
#ICON_KB="㎅"
|
|
||||||
#ICON_MB="㎆"
|
|
||||||
#ICON_GB="㎇"
|
|
||||||
ICON_KB="K"
|
|
||||||
ICON_MB="M"
|
|
||||||
ICON_GB="G"
|
|
||||||
ICON_TB="T"
|
|
||||||
#ICON_KHz="㎑"
|
|
||||||
#ICON_MHz="㎒"
|
|
||||||
#ICON_GHz="㎓"
|
|
||||||
ICON_KHz="KHz"
|
|
||||||
ICON_MHz="MHz"
|
|
||||||
ICON_GHz="GHz"
|
|
||||||
#ICON_MBPS="㏔㎰"
|
|
||||||
ICON_MBPS="Mb"
|
|
||||||
else
|
|
||||||
ICON_C="C"
|
|
||||||
ICON_F="F"
|
|
||||||
ICON_RD="<"
|
|
||||||
ICON_WR=">"
|
|
||||||
ICON_MAIL="[M]"
|
|
||||||
ICON_UP="^"
|
|
||||||
ICON_DN="v"
|
|
||||||
ICON_TRASH="T"
|
|
||||||
ICON_WIFI=
|
|
||||||
ICON_REBOOT="(R)"
|
|
||||||
ICON_UPDATES="!"
|
|
||||||
ICON_SECURITY="!!"
|
|
||||||
ICON_KB="KB"
|
|
||||||
ICON_MB="MB"
|
|
||||||
ICON_GB="GB"
|
|
||||||
ICON_TB="TB"
|
|
||||||
ICON_KHz="kHz"
|
|
||||||
ICON_MHz="MHz"
|
|
||||||
ICON_GHz="GHz"
|
|
||||||
ICON_MBPS="Mbps"
|
|
||||||
fi
|
|
||||||
PCT="%"
|
PCT="%"
|
||||||
|
|
||||||
# Support two different backends (screen/tmux)
|
# Support two different backends (screen/tmux)
|
||||||
|
|
75
usr/lib/byobu/include/icons
Executable file
75
usr/lib/byobu/include/icons
Executable file
|
@ -0,0 +1,75 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# icons: some icon characters for status scripts
|
||||||
|
#
|
||||||
|
# Copyright (C) 2011-2013 Dustin Kirkland
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
PKG="byobu"
|
||||||
|
|
||||||
|
# UTF-8 support in the hardstatus is coming one day in Screen
|
||||||
|
if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then
|
||||||
|
#ICON_C="℃"
|
||||||
|
#ICON_F="℉"
|
||||||
|
ICON_C="C"
|
||||||
|
ICON_F="F"
|
||||||
|
ICON_RD="◂"
|
||||||
|
ICON_WR="▸"
|
||||||
|
ICON_MAIL="⍌"
|
||||||
|
ICON_UP="▴"
|
||||||
|
ICON_DN="▾"
|
||||||
|
ICON_TRASH="♸"
|
||||||
|
ICON_WIFI=
|
||||||
|
ICON_REBOOT="⟳"
|
||||||
|
ICON_UPDATES="!"
|
||||||
|
ICON_SECURITY="‼"
|
||||||
|
#ICON_KB="㎅"
|
||||||
|
#ICON_MB="㎆"
|
||||||
|
#ICON_GB="㎇"
|
||||||
|
ICON_KB="K"
|
||||||
|
ICON_MB="M"
|
||||||
|
ICON_GB="G"
|
||||||
|
ICON_TB="T"
|
||||||
|
#ICON_KHz="㎑"
|
||||||
|
#ICON_MHz="㎒"
|
||||||
|
#ICON_GHz="㎓"
|
||||||
|
ICON_KHz="KHz"
|
||||||
|
ICON_MHz="MHz"
|
||||||
|
ICON_GHz="GHz"
|
||||||
|
#ICON_MBPS="㏔㎰"
|
||||||
|
ICON_MBPS="Mb"
|
||||||
|
else
|
||||||
|
ICON_C="C"
|
||||||
|
ICON_F="F"
|
||||||
|
ICON_RD="<"
|
||||||
|
ICON_WR=">"
|
||||||
|
ICON_MAIL="[M]"
|
||||||
|
ICON_UP="^"
|
||||||
|
ICON_DN="v"
|
||||||
|
ICON_TRASH="T"
|
||||||
|
ICON_WIFI=
|
||||||
|
ICON_REBOOT="(R)"
|
||||||
|
ICON_UPDATES="!"
|
||||||
|
ICON_SECURITY="!!"
|
||||||
|
ICON_KB="KB"
|
||||||
|
ICON_MB="MB"
|
||||||
|
ICON_GB="GB"
|
||||||
|
ICON_TB="TB"
|
||||||
|
ICON_KHz="kHz"
|
||||||
|
ICON_MHz="MHz"
|
||||||
|
ICON_GHz="GHz"
|
||||||
|
ICON_MBPS="Mbps"
|
||||||
|
fi
|
45
usr/lib/byobu/include/toggle-utf8
Executable file
45
usr/lib/byobu/include/toggle-utf8
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
#
|
||||||
|
# toggle-utf8
|
||||||
|
# Copyright (C) 2013 Dustin Kirkland
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
PKG="byobu"
|
||||||
|
[ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
|
||||||
|
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
|
||||||
|
. "${BYOBU_PREFIX}/lib/${PKG}/include/common"
|
||||||
|
[ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc"
|
||||||
|
|
||||||
|
if [ "$BYOBU_CHARMAP" = "UTF-8" ]; then
|
||||||
|
if grep -qs "^BYOBU_CHARMAP=" $BYOBU_CONFIG_DIR/statusrc 2>/dev/null; then
|
||||||
|
sed -i -e "s/^BYOBU_CHARMAP=.*/BYOBU_CHARMAP=x/" $BYOBU_CONFIG_DIR/statusrc
|
||||||
|
else
|
||||||
|
echo "BYOBU_CHARMAP=x" >> $BYOBU_CONFIG_DIR/statusrc
|
||||||
|
fi
|
||||||
|
export BYOBU_CHARMAP=x
|
||||||
|
else
|
||||||
|
if grep -qs "^BYOBU_CHARMAP=" $BYOBU_CONFIG_DIR/statusrc 2>/dev/null; then
|
||||||
|
sed -i -e "s/^BYOBU_CHARMAP=.*/BYOBU_CHARMAP=UTF-8/" $BYOBU_CONFIG_DIR/statusrc
|
||||||
|
else
|
||||||
|
echo "BYOBU_CHARMAP=UTF-8" >> $BYOBU_CONFIG_DIR/statusrc
|
||||||
|
fi
|
||||||
|
export BYOBU_CHARMAP=UTF-8
|
||||||
|
fi
|
||||||
|
if [ -n "$TMUX" ]; then
|
||||||
|
tmux send-keys " export BYOBU_CHARMAP=$BYOBU_CHARMAP ; . ~/.bashrc" \; send-keys Enter
|
||||||
|
fi
|
||||||
|
|
||||||
|
# vi: syntax=sh ts=4 noexpandtab
|
|
@ -53,7 +53,7 @@ bind-key -n M-S-Down resize-pane -D
|
||||||
bind-key -n M-S-Left resize-pane -L
|
bind-key -n M-S-Left resize-pane -L
|
||||||
bind-key -n M-S-Right resize-pane -R
|
bind-key -n M-S-Right resize-pane -R
|
||||||
bind-key -n F5 source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
|
bind-key -n F5 source $BYOBU_PREFIX/share/byobu/profiles/tmuxrc
|
||||||
#bind-key -n F5 source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc" \; run-shell "$BYOBU_PREFIX/lib/byobu/include/tmux-detach-all-but-current-client"
|
bind-key -n M-F5 run-shell '$BYOBU_PREFIX/lib/byobu/include/toggle-utf8' \; 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 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-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 C-S-F5 new-window -d "byobu-select-profile -r"
|
||||||
|
|
|
@ -54,6 +54,7 @@ unbind-key -n S-M-Down
|
||||||
unbind-key -n S-M-Left
|
unbind-key -n S-M-Left
|
||||||
unbind-key -n S-M-Right
|
unbind-key -n S-M-Right
|
||||||
unbind-key -n F5
|
unbind-key -n F5
|
||||||
|
unbind-key -n M-F5
|
||||||
unbind-key -n S-F5
|
unbind-key -n S-F5
|
||||||
unbind-key -n C-F5
|
unbind-key -n C-F5
|
||||||
unbind-key -n C-S-F5
|
unbind-key -n C-S-F5
|
||||||
|
|
|
@ -17,6 +17,7 @@ and some convenient keybindings:
|
||||||
Ctrl-Shift-F3/F4 Move a window
|
Ctrl-Shift-F3/F4 Move a window
|
||||||
Shift-Alt-Left/Right/Up/Down Resize a split
|
Shift-Alt-Left/Right/Up/Down Resize a split
|
||||||
F5 Reload profile, refresh status
|
F5 Reload profile, refresh status
|
||||||
|
Alt-F5 Toggle UTF-8 support, refresh status
|
||||||
Shift-F5 Toggle through status lines
|
Shift-F5 Toggle through status lines
|
||||||
Ctrl-F5 Reconnect ssh/gpg/dbus sockets
|
Ctrl-F5 Reconnect ssh/gpg/dbus sockets
|
||||||
Ctrl-Shift-F5 Change status bar's color randomly
|
Ctrl-Shift-F5 Change status bar's color randomly
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue