mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
usr/share/byobu/profiles/common, usr/bin/byobu:
This commit is contained in:
parent
ad5560e1a4
commit
1701c06fcb
3 changed files with 15 additions and 9 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -77,7 +77,7 @@ byobu (4.30) unreleased; urgency=low
|
|||
* usr/bin/byobu, usr/bin/byobu-janitor, usr/lib/byobu/.shutil:
|
||||
- flatten bold/dim/bright modifiers when in 8-color mode
|
||||
* usr/lib/byobu/ip_address, usr/lib/byobu/.shutil,
|
||||
usr/share/byobu/profiles/common:
|
||||
usr/share/byobu/profiles/common, usr/bin/byobu:
|
||||
- fix bold printing
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 11 Aug 2011 10:31:31 -0500
|
||||
|
|
|
@ -42,7 +42,7 @@ fi
|
|||
# Determine backend
|
||||
case "$0" in
|
||||
*byobu-screen) export BYOBU_BACKEND="screen" ;;
|
||||
*byobu-tmux) export BYOBU_BACKEND="tmux" TERM="screen-256color" ;;
|
||||
*byobu-tmux) export BYOBU_BACKEND="tmux" ;;
|
||||
esac
|
||||
|
||||
# Sanitize the environment
|
||||
|
@ -58,6 +58,12 @@ fi
|
|||
|
||||
case $BYOBU_BACKEND in
|
||||
tmux)
|
||||
# Check if our terminfo supports 256 colors
|
||||
if command -v tput >/dev/null; then
|
||||
if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then
|
||||
export TERM="screen-256color" BYOBU_COLOR=256
|
||||
fi
|
||||
fi
|
||||
PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc"
|
||||
;;
|
||||
*)
|
||||
|
@ -79,7 +85,7 @@ case $BYOBU_BACKEND in
|
|||
# Check if our terminfo supports 256 colors
|
||||
if command -v tput >/dev/null; then
|
||||
if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then
|
||||
export SCREEN_TERM="-T screen-256color"
|
||||
export SCREEN_TERM="-T screen-256color" BYOBU_COLOR=256
|
||||
fi
|
||||
fi
|
||||
# Some users want to maintain separate configurations
|
||||
|
|
|
@ -27,8 +27,8 @@ color_screen() {
|
|||
-) printf "$ESC{-}" ;;
|
||||
--) printf "$ESC{-} " ;;
|
||||
esc) printf "$ESC" ;;
|
||||
bold1) [ -n "$SCREEN_TERM" ] && printf "$ESC{=b }" || printf "$ESC{= }" ;;
|
||||
bold2) [ -n "$SCREEN_TERM" ] && printf "$ESC{+b }" || printf "$ESC{= }" ;;
|
||||
bold1) [ -n "$BYOBU_COLOR" ] && printf "$ESC{=b }" || printf "$ESC{= }" ;;
|
||||
bold2) [ -n "$BYOBU_COLOR" ] && printf "$ESC{+b }" || printf "$ESC{= }" ;;
|
||||
none) printf "$ESC{= }" ;;
|
||||
invert) printf "$ESC{=r }" ;;
|
||||
*)
|
||||
|
@ -42,7 +42,7 @@ color_screen() {
|
|||
;;
|
||||
esac
|
||||
[ "$MONOCHROME" = "1" ] && (fg= ; bg= )
|
||||
[ -n "$SCREEN_TERM" ] || attr=
|
||||
[ -n "$BYOBU_COLOR" ] || attr=
|
||||
printf "$ESC{=$attr $fg$bg}"
|
||||
;;
|
||||
esac
|
||||
|
@ -50,7 +50,7 @@ color_screen() {
|
|||
|
||||
color_map() {
|
||||
local mod=
|
||||
[ -n "$SCREEN_TERM" ] && mod=",dim"
|
||||
[ -n "$BYOBU_COLOR" ] && mod=",dim"
|
||||
case "$1" in
|
||||
k) _RET="black$mod" ;;
|
||||
r) _RET="red$mod" ;;
|
||||
|
@ -85,7 +85,7 @@ attr_map() {
|
|||
i) _RET=,italics ;;
|
||||
*) _RET= ;;
|
||||
esac
|
||||
[ -n "$SCREEN_TERM" ] || _RET=
|
||||
[ -n "$BYOBU_COLOR" ] || _RET=
|
||||
}
|
||||
|
||||
color_tmux() {
|
||||
|
@ -95,7 +95,7 @@ color_tmux() {
|
|||
-) printf "#[default]" ;;
|
||||
--) printf "#[default] " ;;
|
||||
esc) printf "" ;;
|
||||
bold*) [ -n "$SCREEN_TERM" ] && printf "#[fg=bold]" ;;
|
||||
bold*) [ -n "$BYOBU_COLOR" ] && printf "#[fg=bold]" ;;
|
||||
none) printf "#[default]" ;;
|
||||
invert) printf "#[reverse]" ;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue